Skip to content
Snippets Groups Projects
Commit 4b1533e9 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Migration Zend => Laminas

parent 311d922d
Branches
Tags
No related merge requests found
Pipeline #11546 passed
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
namespace UnicaenImport; namespace UnicaenImport;
use Zend\ModuleManager\Feature\ConfigProviderInterface; use Laminas\ModuleManager\Feature\ConfigProviderInterface;
use Zend\ModuleManager\Feature\ConsoleUsageProviderInterface; use Laminas\ModuleManager\Feature\ConsoleUsageProviderInterface;
use Zend\Console\Adapter\AdapterInterface as ConsoleAdapterInterface; use Laminas\Console\Adapter\AdapterInterface as ConsoleAdapterInterface;
use Zend\Mvc\MvcEvent; use Laminas\Mvc\MvcEvent;
/** /**
* *
......
<?php <?php
namespace UnicaenImportTest; namespace UnicaenImportTest;
use Zend\Loader\AutoloaderFactory; use Laminas\Loader\AutoloaderFactory;
use Zend\Mvc\Service\ServiceManagerConfig; use Laminas\Mvc\Service\ServiceManagerConfig;
use Zend\ServiceManager\ServiceManager; use Laminas\ServiceManager\ServiceManager;
use RuntimeException; use RuntimeException;
...@@ -61,8 +61,8 @@ class Bootstrap ...@@ -61,8 +61,8 @@ class Bootstrap
$zf2Path = ZF2_PATH; $zf2Path = ZF2_PATH;
} elseif (is_dir($vendorPath . '/ZF2/library')) { } elseif (is_dir($vendorPath . '/ZF2/library')) {
$zf2Path = $vendorPath . '/ZF2/library'; $zf2Path = $vendorPath . '/ZF2/library';
} elseif (is_dir($vendorPath . '/zendframework/zendframework/library')) { } elseif (is_dir($vendorPath . '/laminas/laminas/library')) {
$zf2Path = $vendorPath . '/zendframework/zendframework/library'; $zf2Path = $vendorPath . '/laminas/laminas/library';
} }
} }
...@@ -70,9 +70,9 @@ class Bootstrap ...@@ -70,9 +70,9 @@ class Bootstrap
throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.'); throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.');
} }
include $zf2Path . '/Zend/Loader/AutoloaderFactory.php'; include $zf2Path . '/Laminas/Loader/AutoloaderFactory.php';
AutoloaderFactory::factory(array( AutoloaderFactory::factory(array(
'Zend\Loader\StandardAutoloader' => array( 'Laminas\Loader\StandardAutoloader' => array(
'autoregister_zf' => true, 'autoregister_zf' => true,
'namespaces' => array( 'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/' . __NAMESPACE__, __NAMESPACE__ => __DIR__ . '/' . __NAMESPACE__,
......
...@@ -15,4 +15,4 @@ $testConfig = array( ...@@ -15,4 +15,4 @@ $testConfig = array(
), ),
); );
return \Zend\Stdlib\ArrayUtils::merge($appConfig, $testConfig); return \Laminas\Stdlib\ArrayUtils::merge($appConfig, $testConfig);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment