Skip to content

Commit

Permalink
Add content mapper implementation (#36)
Browse files Browse the repository at this point in the history
* Add content mapper implementation

* Add more tests

* Add coveralls ci check

* Memory limit circle ci

* Fix after review

* Fix code coverage

* Fix code coverage

* Fix phpstan issues

* Merge Create and Modify ContentHandler into SaveContentHandler

* Add comment toe templateMapper

* Move Type constant to Content and fix typo
  • Loading branch information
alexander-schranz authored and niklasnatter committed Nov 13, 2019
1 parent f0470a8 commit 3ef2765
Show file tree
Hide file tree
Showing 90 changed files with 3,523 additions and 749 deletions.
50 changes: 39 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
# PHP CircleCI 2.0 configuration file
# PHP CircleCI 2.1 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
version: 2.1

.environment_variables: &environment_variables
APP_ENV: test
DATABASE_URL: mysql://root:[email protected]:3306/su_content_test
DATABASE_CHARSET: utf8mb4
DATABASE_COLLATE: utf8mb4_unicode_ci

.enable_pcov: &enable_pcov
name: Enable PCOV, disable Xdebug
command: |
pecl install pcov
docker-php-ext-enable pcov
rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini || true
commands:
enable_php_pcov:
steps:
- run:
name: Enable PCOV, disable Xdebug
command: |
pecl install pcov
docker-php-ext-enable pcov
rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini || true
disable_php_memory_limit:
steps:
- run:
name: Disable PHP memory limit
command: echo -e 'memory_limit=-1' > /usr/local/etc/php/conf.d/memory_limit.ini

workflows:
version: 2
Expand All @@ -32,6 +41,9 @@ workflows:
requires:
- composer
- test
- coverage-all-upload:
requires:
- test

jobs:
composer:
Expand Down Expand Up @@ -85,10 +97,11 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: *enable_pcov
- enable_php_pcov
- disable_php_memory_limit
- run: php -m
- run: php composer.phar bootstrap-test-environment
- run: php composer.phar test-coverage
- run: php composer.phar test-coverage -- --coverage-clover Tests/reports/clover.xml
- store_artifacts:
path: Tests/reports/html
- store_test_results:
Expand All @@ -106,5 +119,20 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: *enable_pcov
- enable_php_pcov
- disable_php_memory_limit
- run: php composer.phar test-coverage-checker

coverage-all-upload:
docker:
- image: sulu/php:7.2-cli
environment: *environment_variables
steps:
- checkout
- attach_workspace:
at: .
- disable_php_memory_limit
- run: curl -L https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar --output php-coveralls.phar
- run: chmod +x php-coveralls.phar
- run: apt-get update && apt-get install git -y
- run: php php-coveralls.phar --coverage_clover Tests/reports/clover.xml --json_path Tests/reports/coveralls.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
/phpunit.xml
.phpunit.result.cache

# coverall
/php-coveralls.phar

# php-cs
.php_cs.cache

Expand Down
62 changes: 0 additions & 62 deletions Common/Model/EntityNotFoundException.php

This file was deleted.

34 changes: 0 additions & 34 deletions Common/Model/MissingResultException.php

This file was deleted.

183 changes: 0 additions & 183 deletions Common/Payload/PayloadTrait.php

This file was deleted.

Loading

0 comments on commit 3ef2765

Please sign in to comment.