Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upd: Adding Symfony 4 Compatibility #294

Closed
wants to merge 13 commits into from
27 changes: 20 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,42 @@ php:
- 5.6
- 7.0
- 7.1
- 7.2

matrix:
fast_finish: true
allow_failures:
- php: 7.2
exclude:
- php: 5.6
env: SYMFONY_VERSION=4.0.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha
- php: 7.0
env: SYMFONY_VERSION=4.0.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha
- php: 7.2
env: SYMFONY_VERSION=2.8.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha

services:
- mongodb

env:
- SYMFONY_VERSION=2.8.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test
- SYMFONY_VERSION=3.0.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test
- SYMFONY_VERSION=3.1.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test
- SYMFONY_VERSION=3.2.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test
- SYMFONY_VERSION=3.3.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test

- SYMFONY_VERSION=2.8.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha
- SYMFONY_VERSION=3.0.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha
- SYMFONY_VERSION=3.1.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha
- SYMFONY_VERSION=3.2.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha
- SYMFONY_VERSION=3.3.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha
- SYMFONY_VERSION=3.4.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha
- SYMFONY_VERSION=4.0.* DB=pdo_mysql DB_USER=root DB_NAME=lexik_test DEPENDENCIES=alpha
cache:
directories:
- $HOME/.composer/cache

before_install:
- if [ "$DEPENDENCIES" = "beta" ]; then composer config minimum-stability beta; fi;
- if [ "$DEPENDENCIES" = "alpha" ]; then composer config minimum-stability alpha; fi;
- if [ -x .travis/before_install.sh ]; then .travis/before_install.sh; fi;

install:
- if [ -x .travis/install.sh ]; then .travis/install.sh; fi;

script:
- php vendor/bin/phpunit -v
- php vendor/bin/phpunit -v
2 changes: 1 addition & 1 deletion .travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then
TRAVIS_INI_FILE="$PHP_INI_DIR/travis.ini"
echo "memory_limit=3072M" >> "$TRAVIS_INI_FILE"

if [ "$TRAVIS_PHP_VERSION" '<' '7.0' ]; then
if [ "$TRAVIS_PHP_VERSION" '<' '7.0' ]; then
echo "extension=mongo.so" >> "$TRAVIS_INI_FILE"
else
echo "extension=mongodb.so" >> "$TRAVIS_INI_FILE"
Expand Down
16 changes: 8 additions & 8 deletions Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</service>

<!-- Managers -->
<service id="lexik_translation.trans_unit.manager" class="%lexik_translation.trans_unit.manager.class%">
<service id="lexik_translation.trans_unit.manager" class="%lexik_translation.trans_unit.manager.class%" public="true">
<argument type="service" id="lexik_translation.translation_storage" />
<argument type="service" id="lexik_translation.file.manager" />
<argument>%kernel.root_dir%</argument>
Expand All @@ -73,12 +73,12 @@
<argument>%kernel.root_dir%</argument>
</service>

<service id="lexik_translation.locale.manager" class="%lexik_translation.locale.manager.class%">
<service id="lexik_translation.locale.manager" class="%lexik_translation.locale.manager.class%" public="true">
<argument>%lexik_translation.managed_locales%</argument>
</service>

<!-- Importer -->
<service id="lexik_translation.importer.file" class="%lexik_translation.importer.file.class%">
<service id="lexik_translation.importer.file" class="%lexik_translation.importer.file.class%" public="true">
<argument type="collection" /> <!-- translation loaders -->
<argument type="service" id="lexik_translation.translation_storage" />
<argument type="service" id="lexik_translation.trans_unit.manager" />
Expand All @@ -89,7 +89,7 @@
</service>

<!-- Exporter -->
<service id="lexik_translation.exporter_collector" class="%lexik_translation.exporter_collector.class%" />
<service id="lexik_translation.exporter_collector" class="%lexik_translation.exporter_collector.class%" public="true"/>

<service id="lexik_translation.exporter.xliff" class="%lexik_translation.exporter.xliff.class%">
<tag name="lexik_translation.exporter" alias="xlf" />
Expand All @@ -110,12 +110,12 @@
</service>

<!-- Data grid -->
<service id="lexik_translation.data_grid.formatter" class="%lexik_translation.data_grid.formatter.class%">
<service id="lexik_translation.data_grid.formatter" class="%lexik_translation.data_grid.formatter.class%" public="true">
<argument type="service" id="lexik_translation.locale.manager" />
<argument>%lexik_translation.storage.type%</argument>
</service>

<service id="lexik_translation.data_grid.request_handler" class="%lexik_translation.data_grid.request_handler.class%">
<service id="lexik_translation.data_grid.request_handler" class="%lexik_translation.data_grid.request_handler.class%" public="true">
<argument type="service" id="lexik_translation.trans_unit.manager" />
<argument type="service" id="lexik_translation.file.manager" />
<argument type="service" id="lexik_translation.translation_storage" />
Expand All @@ -129,13 +129,13 @@
</service>

<!-- Overview -->
<service id="lexik_translation.overview.stats_aggregator" class="%lexik_translation.overview.stats_aggregator.class%">
<service id="lexik_translation.overview.stats_aggregator" class="%lexik_translation.overview.stats_aggregator.class%" public="true">
<argument type="service" id="lexik_translation.translation_storage" />
<argument type="service" id="lexik_translation.locale.manager" />
</service>

<!-- Form -->
<service id="lexik_translation.form.handler.trans_unit" class="%lexik_translation.form.handler.trans_unit.class%">
<service id="lexik_translation.form.handler.trans_unit" class="%lexik_translation.form.handler.trans_unit.class%" public="true">
<argument type="service" id="lexik_translation.trans_unit.manager" />
<argument type="service" id="lexik_translation.file.manager" />
<argument type="service" id="lexik_translation.translation_storage" />
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
],
"require": {
"php": "^5.6 || ^7.0",
"symfony/framework-bundle": "~2.8|~3.0"
"symfony/framework-bundle": "~2.8|~3.0|~4.0"
},
"require-dev": {
"doctrine/orm": "^2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"doctrine/data-fixtures": "~1.1",
"doctrine/mongodb-odm-bundle": "~3.0",
"doctrine/mongodb": "~1.0",
"propel/propel-bundle": "~3.0@dev",
"propel/propel": "dev-master",
"phpunit/phpunit": "^5.7"
},
"suggest": {
Expand Down