-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from MontealegreLuis/next
Support for nullable types
- Loading branch information
Showing
167 changed files
with
1,570 additions
and
725 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Checkout project" | ||
uses: actions/checkout@v1 | ||
|
||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "7.1" | ||
extensions: imagick | ||
ini-values: memory_limit=-1 | ||
coverage: xdebug | ||
tools: composer:v1 | ||
|
||
- name: "Install dependencies with composer" | ||
run: | | ||
sudo apt-get install graphviz | ||
composer install --no-interaction --no-progress --no-suggest | ||
- name: "Code quality checks" | ||
run: "make check" | ||
|
||
- name: "Run tests with coverage" | ||
run: "vendor/bin/phpunit --exclude-group=snapshot --coverage-text --coverage-clover=coverage.clover" | ||
|
||
- name: "Send code coverage to Scrutinizer" | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: "Checkout documentation" | ||
uses: actions/checkout@v1 | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "7.1" | ||
ini-values: memory_limit=-1 | ||
tools: composer:v1 | ||
|
||
- name: "Generate documentation" | ||
run: | | ||
composer global require couscous/couscous:1.7.3 | ||
couscous generate | ||
- name: "Deploy documentation to Github Pages" | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./.couscous/generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* PHP version 7.1 | ||
* | ||
* This source file is subject to the license that is bundled with this package in the file LICENSE. | ||
*/ | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in([__DIR__ . '/tests']) | ||
->exclude('resources'); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
|
||
return $config->setRules([ | ||
'@PSR2' => true, | ||
'visibility_required' => false, | ||
'no_unused_imports' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'single_blank_line_before_namespace' => true, | ||
'ordered_imports' => true, | ||
'single_quote' => true, | ||
'trailing_comma_in_multiline' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'no_superfluous_phpdoc_tags' => true, | ||
'no_empty_phpdoc' => true, | ||
'no_empty_statement' => true, | ||
'array_indentation' => true, | ||
'combine_consecutive_issets' => true, | ||
'combine_consecutive_unsets' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'class_attributes_separation' => ['elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one']], | ||
]) | ||
->setFinder($finder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* PHP version 7.1 | ||
* | ||
* This source file is subject to the license that is bundled with this package in the file LICENSE. | ||
*/ | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in([__DIR__ . '/src']); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
|
||
return $config->setRules([ | ||
'@PSR2' => true, | ||
'no_unused_imports' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'single_blank_line_before_namespace' => true, | ||
'ordered_imports' => true, | ||
'single_quote' => true, | ||
'trailing_comma_in_multiline' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'no_superfluous_phpdoc_tags' => true, | ||
'no_empty_phpdoc' => true, | ||
'no_empty_statement' => true, | ||
'array_indentation' => true, | ||
'combine_consecutive_issets' => true, | ||
'combine_consecutive_unsets' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'class_attributes_separation' => ['elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one']], | ||
]) | ||
->setFinder($finder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
FROM ubuntu:trusty | ||
|
||
RUN apt-get update -y | ||
RUN apt-get install -y software-properties-common python-software-properties | ||
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php | ||
RUN apt-get update -y | ||
RUN apt-get install -y graphviz | ||
RUN apt-get install -y pkg-config | ||
RUN apt-get -y install libmagickwand-dev imagemagick php7.1 php7.1-dev php7.1-xml php7.1-xdebug | ||
RUN yes | pecl install imagick | ||
RUN echo "extension=imagick.so" > /etc/php/7.1/mods-available/imagick.ini | ||
RUN ln -s /etc/php/7.1/mods-available/imagick.ini /etc/php/7.1/cli/conf.d/20-imagick.ini | ||
RUN mkdir -p /usr/src/phuml | ||
|
||
WORKDIR /usr/src/phuml | ||
FROM composer:1.10 AS composer | ||
|
||
ADD composer.* ./ | ||
ADD src/ src | ||
|
||
RUN composer global require hirak/prestissimo --no-plugins --no-scripts | ||
RUN composer install --optimize-autoloader --prefer-dist --no-progress --no-interaction --ignore-platform-reqs | ||
|
||
FROM php:7.1.30-cli-alpine AS phuml | ||
MAINTAINER Luis Montealegre <[email protected]> | ||
|
||
RUN apk add --update --no-cache autoconf g++ pkgconfig imagemagick imagemagick-dev make ttf-freefont graphviz \ | ||
&& printf "\n" | pecl install imagick \ | ||
&& echo "extension=imagick.so" >> /usr/local/etc/php/php.ini | ||
|
||
WORKDIR /app | ||
|
||
ADD bin/phuml* bin/ | ||
ADD src/ src | ||
|
||
ENV PATH="/app/bin:${PATH}" | ||
|
||
COPY --from=composer /app/vendor/ ./vendor | ||
|
||
WORKDIR /code | ||
|
||
ENTRYPOINT ["phuml"] |
Oops, something went wrong.