Skip to content

Commit 356c9d0

Browse files
committed
Setup repository
0 parents  commit 356c9d0

9 files changed

Lines changed: 207 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Unit tests and checkstyle
2+
on: [push]
3+
jobs:
4+
phpunit:
5+
runs-on: ${{ matrix.operating-system }}
6+
strategy:
7+
matrix:
8+
operating-system: ['ubuntu-latest']
9+
php-versions: ['8.3', '8.4']
10+
phpunit-versions: ['latest']
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v6
14+
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: ${{ matrix.php-versions }}
19+
extensions: mbstring
20+
coverage: xdebug
21+
tools: composer:v2, php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}
22+
23+
- name: Get composer cache directory
24+
id: composer-cache
25+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
26+
27+
- name: Cache dependencies
28+
uses: actions/cache@v3
29+
with:
30+
path: ${{ steps.composer-cache.outputs.dir }}
31+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
32+
restore-keys: ${{ runner.os }}-composer-
33+
34+
- name: Install dependencies
35+
run: composer install --prefer-dist
36+
37+
- name: Run PHPCS
38+
run: ./vendor/bin/phpcs src tests -v --standard=PSR2
39+
40+
- name: Run Psalm
41+
run: ./vendor/bin/psalm --show-info=true
42+
43+
- name: Run PHPStan
44+
run: ./vendor/bin/phpstan analyse
45+
46+
- name: Run PHPUnit
47+
run: ./vendor/bin/phpunit --coverage-text --colors

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# IDE
2+
/.idea/
3+
4+
# PHP Unit
5+
.phpunit.cache
6+
.phpunit.result.cache
7+
8+
# Composer
9+
composer.lock
10+
composer.phar
11+
/vendor/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Inserve
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Cloud Factory API
2+
PHP wrapper for the Cloud Factory API
3+
4+
## Requirements
5+
[![PHP Version Require](https://poser.pugx.org/inserve/cloud-factory-api-php/require/php)](https://packagist.org/packages/inserve/cloud-factory-api-php)
6+
7+
## Status
8+
9+
![workflow](https://github.com/inserveit/cloud-factory-api-php/actions/workflows/build-actions.yml/badge.svg)
10+
[![Latest Stable Version](https://poser.pugx.org/inserve/cloud-factory-api-php/v)](https://packagist.org/packages/inserve/cloud-factory-api-php)
11+
[![Latest Unstable Version](https://poser.pugx.org/inserve/cloud-factory-api-php/v/unstable)](https://packagist.org/packages/inserve/cloud-factory-api-php)
12+
[![License](https://poser.pugx.org/inserve/cloud-factory-api-php/license)](https://packagist.org/packages/inserve/cloud-factory-api-php)
13+
14+
## Cloud Factory Docs
15+
- [API Documentation](https://partnercare.knowledge.cloudfactorygroup.com/servicedesk/customer/portal/1/topic/9418e0a3-edc5-4e51-b532-c4d63be3fbe9/article/2752151560)
16+
17+
## Installation
18+
`composer require inserve/cloud-factory-api-php`
19+
20+
## Usage example
21+
22+
```php
23+
```

composer.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "inserve/cloud-factory-api-php",
3+
"description": "A PHP wrapper for the Cloud Factory API",
4+
"license": "MIT",
5+
"type": "library",
6+
"require": {
7+
"php": "^8.3",
8+
"guzzlehttp/guzzle": "^7.7",
9+
"symfony/serializer": "^6.3|^7",
10+
"symfony/property-access": "^6.3|^7",
11+
"psr/log": "^3.0",
12+
"phpdocumentor/reflection-docblock": "^5.3"
13+
},
14+
"require-dev": {
15+
"phpunit/phpunit": "^12",
16+
"squizlabs/php_codesniffer": "^3.7",
17+
"phpstan/phpstan": "^2",
18+
"vimeo/psalm": "^6"
19+
},
20+
"autoload": {
21+
"psr-4": {
22+
"Inserve\\CloudFactoryAPI\\": "src/"
23+
}
24+
},
25+
"autoload-dev": {
26+
"psr-4": {
27+
"Inserve\\CloudFactoryAPI\\Tests\\": "tests/"
28+
}
29+
},
30+
"authors": [
31+
{
32+
"name": "Inserve",
33+
"email": "dev@inserve.nl"
34+
}
35+
],
36+
"minimum-stability": "stable"
37+
}

phpstan.neon

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
parameters:
2+
level: 5
3+
paths:
4+
- src
5+
- tests
6+
7+
treatPhpDocTypesAsCertain:
8+
false

phpunit.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.4/phpunit.xsd"
5+
backupGlobals="false"
6+
beStrictAboutTestsThatDoNotTestAnything="false"
7+
colors="true"
8+
processIsolation="false"
9+
stopOnError="false"
10+
stopOnFailure="false"
11+
cacheDirectory=".phpunit.cache"
12+
backupStaticProperties="false"
13+
>
14+
<testsuites>
15+
<testsuite name="default">
16+
<directory>tests</directory>
17+
</testsuite>
18+
</testsuites>
19+
<source restrictNotices="true" restrictWarnings="true" ignoreIndirectDeprecations="true">
20+
<include>
21+
<directory>src</directory>
22+
</include>
23+
</source>
24+
</phpunit>

psalm.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
errorLevel="3"
4+
resolveFromConfigFile="true"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xmlns="https://getpsalm.org/schema/config"
7+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
findUnusedBaselineEntry="true"
9+
findUnusedCode="false"
10+
>
11+
<issueHandlers>
12+
<ClassMustBeFinal errorLevel="suppress" />
13+
<InaccessibleProperty errorLevel="suppress" />
14+
</issueHandlers>
15+
16+
<projectFiles>
17+
<directory name="src" />
18+
<directory name="tests" />
19+
<ignoreFiles>
20+
<directory name="vendor" />
21+
</ignoreFiles>
22+
</projectFiles>
23+
</psalm>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Inserve\CloudFactoryAPI\Exception;
4+
5+
use Exception;
6+
7+
/**
8+
*
9+
*/
10+
final class CloudFactoryAPIException extends Exception
11+
{
12+
13+
}

0 commit comments

Comments
 (0)