Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
db6b446
TIP-747: Update Symfony to 3.2
anaelChardan Jul 17, 2017
ff4c597
TIP-747: Config and missing quotes
anaelChardan Jul 17, 2017
501d2cf
TIP-747: Doctrine config
anaelChardan Jul 17, 2017
101c356
TIP-747: Fix form thing
anaelChardan Jul 17, 2017
73502f7
TIP-747: Fix Router and Query related things
anaelChardan Jul 17, 2017
210bf42
TIP-747: Fix Validator things
anaelChardan Jul 17, 2017
1e9868e
TIP-747: Fix Oro related things
anaelChardan Jul 17, 2017
fd87f9e
TIP-747: Fix Tests
anaelChardan Jul 17, 2017
8fc3d21
TIP-747: fix association type
Jul 18, 2017
e3dffde
TIP-747: fix form type in import/export
Jul 18, 2017
b8df6ef
TIP-747: reverse label/code for form type
Jul 18, 2017
72f6436
TIP-747: fix user form type
Jul 19, 2017
11f1f58
TIP-747: fix variant group form type
Jul 19, 2017
e977d1d
TIP-747: fix comment form type
Jul 19, 2017
4a82bc2
TIP-747: fix acl form type
Jul 24, 2017
7e0c0b7
TIP-747: fix deprecated options
Jul 24, 2017
4b87db7
TIP-747: remove the useless clear of the unit of work
Jul 25, 2017
64919f8
TIP-747: call doctrine ClassUtils instead of deprecated method in Sym…
Jul 27, 2017
9fbdfe8
TIP-747: change namespace to remove deprecated ValidatorInterface
Jul 28, 2017
b70f25b
TIP-747: add explicite json format for route
Jul 31, 2017
5d85588
TIP-747: add logs dir in command launcher
Jul 31, 2017
65617ff
TIP-747: update Symfony from 3.2 to 3.3
Aug 1, 2017
ba9d2d7
TIP-747: fix configuration of extension
Aug 1, 2017
40db29b
TIP-747: use Sf 3.3 front controllers
Aug 1, 2017
89a98e4
TIP-747: remove deprecated call
Aug 1, 2017
2b1e0ef
TIP-747: remove call of deprecated SerializerAwareNormalizer and use …
Aug 1, 2017
066a642
TIP-747: implode locales as ArrayInput allows only a string
Aug 1, 2017
7976040
TIP-747: add BC break because of the migration
Aug 1, 2017
35053fb
TIP-747: upgrade dependencies
Aug 2, 2017
5e0180a
TIP-747: use symfony normalizer instead of JMS
Aug 2, 2017
24d9169
TIP-747: configure php-cs-fixer to avoid alignement on multiline
Aug 3, 2017
2fdba4e
TIP-747: fix php-cs-fixer
Aug 3, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ app/AppKernel_local.php
app/console_local
app/archive/*
app/cache/*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because if peoples update their PIM they will keep the app/cache folder and you will have to pay attention to not push it, it costs nothing to keep it.

var/cache/*
app/config/*_local.yml
app/logs/*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

var/logs/*
var/bootstrap.php.cache
app/import/*
app/export/*
app/emails/*
Expand All @@ -32,6 +35,7 @@ composer.phar
!/bin/docker/pim-initialize.sh
!/bin/docker/pim-front.sh
!/bin/merge-coverage
!bin/console
behat.yml
/phpspec.yml
uploads_test/
Expand Down
3 changes: 3 additions & 0 deletions .php_cs.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
'@PSR2' => true,
'linebreak_after_opening_tag' => true,
'ordered_imports' => true,
'method_argument_space' => [
'ensure_fully_multiline' => false
],
))
->setFinder(
PhpCsFixer\Finder::create()
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- GITHUB-6174: Show a loading mask during the file upload in the import jobs
- TIP-730: Reworking of the creation popin for basic entities
- TIP-732: Rework the attribute form using the PEF architecture
- TIP-747: Migrate to Symfony 3.3

## UI\UX Refactoring

Expand Down Expand Up @@ -211,6 +212,12 @@

### Constructors

- Change the constructor of `Oro\Bundle\UserBundle\Form\Handler\AclRoleHandler` to add `Symfony\Component\HttpFoundation\RequestStack`
- Change the constructor of `Oro\Bundle\DataGridBundle\Datagrid\RequestParameters` to add `Symfony\Component\HttpFoundation\RequestStack`
- Change the constructor of `Pim\Bundle\DataGridBundle\Datagrid\Configuration\Product\ContextConfigurator` to add `Symfony\Component\HttpFoundation\RequestStack`
- Change the constructor of `Pim\Bundle\DataGridBundle\Datagrid\Configuration\Product\GroupColumnsConfigurator` to add `Symfony\Component\HttpFoundation\RequestStack`
- Change the constructor of `Pim\Bundle\DataGridBundle\Datagrid\Request\RequestParametersExtractor` to add `Symfony\Component\HttpFoundation\RequestStack`
- Change the constructor of `Pim\Bundle\DataGridBundle\EventListener\AddParametersToProductGridListener` to add `Symfony\Component\HttpFoundation\RequestStack`
- Change the constructor of `Pim\Component\Catalog\Updater\AssociationTypeUpdater` to add `Akeneo\Component\Localization\TranslatableUpdater`
- Change the constructor of `Pim\Component\Catalog\Updater\ChannelUpdater` to add `Akeneo\Component\Localization\TranslatableUpdater`
- Change the constructor of `Pim\Bundle\ApiBundle\Controller\ChannelController` to add `Akeneo\Component\StorageUtils\Factory\SimpleFactoryInterface`,
Expand Down
28 changes: 18 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ stage("Checkout") {
unstash "pim_community_dev"

sh "composer update --optimize-autoloader --no-interaction --no-progress --prefer-dist"
sh "app/console assets:install"
sh "app/console pim:installer:dump-require-paths"
sh "bin/console assets:install"
sh "bin/console pim:installer:dump-require-paths"

stash "pim_community_dev_full"
}
Expand Down Expand Up @@ -101,8 +101,8 @@ stage("Checkout") {
sh "php -d memory_limit=-1 /usr/local/bin/composer run-script post-update-cmd"
}

sh "app/console assets:install"
sh "app/console pim:installer:dump-require-paths"
sh "bin/console assets:install"
sh "bin/console pim:installer:dump-require-paths"

stash "pim_enterprise_dev_full"
}
Expand Down Expand Up @@ -209,7 +209,7 @@ def runPhpUnitTest(phpVersion) {

sh "mkdir -p app/build/logs/"

sh "./bin/phpunit -c app/phpunit.xml.dist --testsuite PIM_Unit_Test --log-junit app/build/logs/phpunit.xml"
sh "./vendor/bin/phpunit -c app/phpunit.xml.dist --testsuite PIM_Unit_Test --log-junit app/build/logs/phpunit.xml"
}
} finally {
sh "docker stop \$(docker ps -a -q) || true"
Expand Down Expand Up @@ -275,7 +275,7 @@ void runIntegrationTest(String phpVersion, String edition, def testFiles) {
sh "sed -i \"s#database_host: .*#database_host: mysql#g\" app/config/parameters_test.yml"
sh "sed -i \"s#index_hosts: .*#index_hosts: 'elasticsearch:9200'#g\" app/config/parameters_test.yml"

sh "./app/console --env=test pim:install --force"
sh "./bin/console --env=test pim:install --force"

sh "mkdir -p app/build/logs/"

Expand All @@ -288,7 +288,7 @@ void runIntegrationTest(String phpVersion, String edition, def testFiles) {

sh "sleep 20"

sh "php -d error_reporting='E_ALL' ./bin/phpunit -c app/phpunit.xml.dist --testsuite PIM_Integration_Test --log-junit app/build/logs/phpunit_integration.xml"
sh "php -d error_reporting='E_ALL' ./vendor/bin/phpunit -c app/phpunit.xml.dist --testsuite PIM_Integration_Test --log-junit app/build/logs/phpunit_integration.xml"
}
}
}
Expand All @@ -314,7 +314,7 @@ def runPhpSpecTest(phpVersion) {

sh "mkdir -p app/build/logs/"

sh "./bin/phpspec run --no-interaction --format=junit > app/build/logs/phpspec.xml"
sh "./vendor/bin/phpspec run --no-interaction --format=junit > app/build/logs/phpspec.xml"
}
} finally {
sh "docker stop \$(docker ps -a -q) || true"
Expand All @@ -338,7 +338,7 @@ def runPhpCsFixerTest() {

sh "mkdir -p app/build/logs/"

sh "./bin/php-cs-fixer fix --diff --dry-run --format=junit --config=.php_cs.php > app/build/logs/phpcs.xml"
sh "./vendor/bin/php-cs-fixer fix --diff --dry-run --format=junit --config=.php_cs.php > app/build/logs/phpcs.xml"
}
} finally {
sh "docker stop \$(docker ps -a -q) || true"
Expand Down Expand Up @@ -366,6 +366,14 @@ def runBehatTest(edition, features, phpVersion) {
}

// Configure the PIM
dir("app") {
sh "ln -s ./../bin/console"
}

dir("bin") {
sh "ln -s ./../vendor/bin/behat"
}

sh "cp app/config/parameters.yml.dist app/config/parameters_test.yml"
sh "sed -i \"s#database_host: .*#database_host: mysql#g\" app/config/parameters_test.yml"
sh "sed -i \"s#index_hosts: .*#index_hosts: 'elasticsearch: 9200'#g\" app/config/parameters_test.yml"
Expand Down Expand Up @@ -398,7 +406,7 @@ def runPhpCouplingDetectorTest() {
docker.image("akeneo/php:7.1").inside("-v /home/akeneo/.composer:/home/docker/.composer -e COMPOSER_HOME=/home/docker/.composer") {
unstash "pim_community_dev_full"

sh "./bin/php-coupling-detector detect --config-file=.php_cd.php src"
sh "./vendor/bin/php-coupling-detector detect --config-file=.php_cd.php src"
}
} finally {
sh "docker stop \$(docker ps -a -q) || true"
Expand Down
12 changes: 6 additions & 6 deletions UPGRADE-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TODO

```bash
export PIM_DIR=/path/to/your/pim/installation
cp app/SymfonyRequirements.php $PIM_DIR/app
cp var/SymfonyRequirements.php $PIM_DIR/app
cp app/PimRequirements.php $PIM_DIR/app

mv $PIM_DIR/app/config/pim_parameters.yml $PIM_DIR/app/config/pim_parameters.yml.bak
Expand Down Expand Up @@ -96,8 +96,8 @@ In this case, go to the chapter "Migrate your custom code" before running the da
6. Then you can migrate your database using:

```bash
rm -rf app/cache
php app/console doctrine:migration:migrate --env=prod
rm -rf var/cache
php bin/console doctrine:migration:migrate --env=prod
```

7. Then, generate JS translations and re-generate the PIM assets:
Expand Down Expand Up @@ -191,8 +191,8 @@ find ./src/ -type f -print0 | xargs -0 sed -i 's/pim_reference_data\.product_val
## Building the front-end with webpack

1. Install nodejs (tested with >=6.11.0 until 8.2.1) and npm 5.0.3, you can follow the instructions here - https://nodejs.org/en/download/package-manager/ or install with homebrew - `brew install node@6` should install both these versions.
2. Run `php app/console pim:installer:dump-require-paths`
3. Run `php app/console assets:install --symlink`
2. Run `php bin/console pim:installer:dump-require-paths`
3. Run `php bin/console assets:install --symlink`
4. Create a file in your project root called `package.json` with the following contents:

```json
Expand All @@ -210,7 +210,7 @@ find ./src/ -type f -print0 | xargs -0 sed -i 's/pim_reference_data\.product_val

5. Run `npm install` inside your project root
6. Run `npm run webpack`
7. Run `php app/console cache:clear`
7. Run `php bin/console cache:clear`
8. Add to your .gitignore the following lines:

```
Expand Down
34 changes: 32 additions & 2 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public function registerBundles()
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');

if (is_file($file = __DIR__.'/config/config_'.$this->getEnvironment().'_local.yml')) {
if (is_file($file = $this->getRootDir() . '/config/config_' . $this->getEnvironment() . '_local.yml')) {
$loader->load($file);
}
}
Expand Down Expand Up @@ -172,4 +172,34 @@ protected function getOroBundles()
new Oro\Bundle\UserBundle\OroUserBundle(),
];
}

/**
* @return string
*/
public function getRootDir(): string
{
return __DIR__;
}

/**
* @return string
*/
public function getCacheDir(): string
{
return dirname(__DIR__)
. DIRECTORY_SEPARATOR
. 'var'
. DIRECTORY_SEPARATOR
. 'cache'
. DIRECTORY_SEPARATOR
. $this->getEnvironment();
}

/**
* @return string
*/
public function getLogDir(): string
{
return dirname(__DIR__) . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR . 'logs';
}
}
6 changes: 3 additions & 3 deletions app/OroRequirements.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once __DIR__ . '/SymfonyRequirements.php';
require_once __DIR__ . '/../var/SymfonyRequirements.php';

use Symfony\Component\Intl\Intl;
use Symfony\Component\Process\ProcessBuilder;
Expand Down Expand Up @@ -93,8 +93,8 @@ function ($cfgValue) use ($mem) {

$directories = array(
'web/bundles',
'app/cache',
'app/logs',
'var/cache',
'var/logs',
);
foreach ($directories as $directory) {
$this->addOroRequirement(
Expand Down
7 changes: 3 additions & 4 deletions app/autoload.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php

use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;

/**
* @var $loader ClassLoader
* @var ClassLoader $loader
*/
$loader = require __DIR__.'/../vendor/autoload.php';

// add possibility to extends doctrine unit test and use mocks
$loader->add( 'Doctrine\\Tests', __DIR__.'/../vendor/doctrine/orm/tests' );

AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
AnnotationRegistry::registerLoader([$loader, 'loadClass']);

return $loader;
Loading