Skip to content

Latest commit

 

History

History
73 lines (55 loc) · 2.21 KB

MigrationGuideFrom6.xTo7.x.md

File metadata and controls

73 lines (55 loc) · 2.21 KB

Migrating From v6 to v7

We removed all New Relic components from Prefab v7, keeping the support for DatadogComponent.

Breaking changes

  • Mandatory: Remove direct or indirect usages/references in your code to Prefab5/NewRelic.php class.
  • Optional: Remove all NewRelic references in Welcome baskets or in Filter paths.

Using a Protean container builder

Prefab v6

$proteanContainerBuilder = new Prefab5\Protean\Container\Builder();
$proteanContainerBuilder->getDiscoverableDirectories()->addDirectoryPathFilter('Prefab5/Doctrine');
$proteanContainerBuilder->getDiscoverableDirectories()->addDirectoryPathFilter('Prefab5/PDO');
$proteanContainerBuilder->getDiscoverableDirectories()->addDirectoryPathFilter('Prefab5/NewRelic');
$proteanContainerBuilder->getDiscoverableDirectories()->addDirectoryPathFilter('Prefab5/Opcache');

// Further builder configuration

$proteanContainer = $proteanContainerBuilder->build();

Prefab v7

$proteanContainerBuilder = new Prefab5\Protean\Container\Builder();
$proteanContainerBuilder->getDiscoverableDirectories()->addDirectoryPathFilter('Prefab5/Doctrine');
$proteanContainerBuilder->getDiscoverableDirectories()->addDirectoryPathFilter('Prefab5/PDO');
$proteanContainerBuilder->getDiscoverableDirectories()->addDirectoryPathFilter('Prefab5/Opcache');

// Further builder configuration

$proteanContainer = $proteanContainerBuilder->build();

Using a Prefab user-defined subset of containers

If you are using a Prefab user-defined subset of containers remove the welcome basket as shown below.

Prefab v6 global config http-buildable-directories.yml in project root

ComponentName/DAO:
  buildable_directories:
    - ComponentName
  welcome_baskets:
    - Doctrine\DBAL
    - PDO
    - Opcache
    - NewRelic
    - Zend\Expressive
    - SearchCriteria

Prefab v7 global config http-buildable-directories.yml in project root

ComponentName/DAO:
  buildable_directories:
    - ComponentName
  welcome_baskets:
    - Doctrine\DBAL
    - PDO
    - Opcache
    - Zend\Expressive
    - SearchCriteria