diff --git a/.gitignore b/.gitignore index 80a69e0..c0684bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -composer.lock -vendor -tests/temp +.idea +/vendor +/composer.lock +tests/*/output \ No newline at end of file diff --git a/.scrutinizer.yml b/.scrutinizer.yml index d712254..e5389ea 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -4,9 +4,7 @@ checks: build: environment: php: - version: 7.2 - variables: - NETTE: default + version: 7.3 dependencies: before: @@ -16,7 +14,7 @@ build: tests: override: - - command: 'vendor/bin/tester tests -p php -c ./tests/php.ini-unix --coverage build/logs/clover.xml --coverage-src src' + command: 'vendor/bin/tester -s -p php -c ./tests/php.ini-unix tests --coverage build/logs/clover.xml --coverage-src src' coverage: file: build/logs/clover.xml format: php-clover diff --git a/.travis.composer.php b/.travis.composer.php deleted file mode 100644 index 764c713..0000000 --- a/.travis.composer.php +++ /dev/null @@ -1,21 +0,0 @@ -=7.2.0", + "php" : ">=7.3.0", "doctrine/orm" : "~2.5", - "nette/di" : "~2.4 || ~3.0", - "nette/utils" : "~2.5 || ~3.0", - "nette/reflection" : "~2.4" + "phpdocumentor/reflection-docblock": "^5.0", + + "nette/di" : "~3.0", + "nette/utils" : "~3.0" }, "require-dev" : { - "nette/bootstrap" : "~2.4 || ~3.0", - "nette/mail" : "~2.4 || ~3.0", - "nette/robot-loader" : "~2.4 || ~3.0", + "nette/bootstrap" : "~3.0", + "nette/http" : "~3.0", + "nette/mail" : "~3.0", + "nette/robot-loader" : "~3.0", "nette/safe-stream" : "~2.3", "nette/tester" : "~2.3", @@ -63,7 +63,8 @@ "pds/skeleton" : "~1.0", - "nettrine/orm" : "~0.3" + "nettrine/orm" : "~0.3", + "contributte/console" : "~0.7" }, "autoload" : { diff --git a/src/IPub/DoctrineCrud/DI/DoctrineCrudExtension.php b/src/IPub/DoctrineCrud/DI/DoctrineCrudExtension.php index 9376eac..8c1ff38 100644 --- a/src/IPub/DoctrineCrud/DI/DoctrineCrudExtension.php +++ b/src/IPub/DoctrineCrud/DI/DoctrineCrudExtension.php @@ -16,6 +16,7 @@ namespace IPub\DoctrineCrud\DI; +use Doctrine; use Doctrine\Common; use Nette; @@ -75,69 +76,37 @@ public function loadConfiguration() : void * CRUD factories */ - // NETTE 3.x - if (method_exists($builder, 'addFactoryDefinition')) { - $builder->addFactoryDefinition($this->prefix('entity.creator')) - ->setImplement(Crud\Create\IEntityCreator::class) - ->setAutowired(FALSE) - ->getResultDefinition() - ->setType(Crud\Create\EntityCreator::class); - - $builder->addFactoryDefinition($this->prefix('entity.updater')) - ->setImplement(Crud\Update\IEntityUpdater::class) - ->setAutowired(FALSE) - ->getResultDefinition() - ->setFactory(Crud\Update\EntityUpdater::class); - - $builder->addFactoryDefinition($this->prefix('entity.deleter')) - ->setImplement(Crud\Delete\IEntityDeleter::class) - ->setAutowired(FALSE) - ->getResultDefinition() - ->setFactory(Crud\Delete\EntityDeleter::class); - - // Syntax sugar for config - $builder->addFactoryDefinition($this->prefix('crud')) - ->setImplement(Crud\IEntityCrudFactory::class) - ->setParameters(['entityName']) - ->getResultDefinition() - ->setType(Crud\EntityCrud::class) - ->setArguments([ - new PhpGenerator\PhpLiteral('$entityName'), - '@' . $this->prefix('entity.mapper'), - '@' . $this->prefix('entity.creator'), - '@' . $this->prefix('entity.updater'), - '@' . $this->prefix('entity.deleter'), - ]); - - // NETTE 2.4+ - } else { - $builder->addDefinition($this->prefix('entity.creator')) - ->setType(Crud\Create\EntityCreator::class) - ->setImplement(Crud\Create\IEntityCreator::class) - ->setAutowired(FALSE); - - $builder->addDefinition($this->prefix('entity.updater')) - ->setType(Crud\Update\EntityUpdater::class) - ->setImplement(Crud\Update\IEntityUpdater::class) - ->setAutowired(FALSE); - - $builder->addDefinition($this->prefix('entity.deleter')) - ->setType(Crud\Delete\EntityDeleter::class) - ->setImplement(Crud\Delete\IEntityDeleter::class) - ->setAutowired(FALSE); - - $builder->addDefinition($this->prefix('crud')) - ->setType(Crud\EntityCrud::class) - ->setImplement(Crud\IEntityCrudFactory::class) - ->setParameters(['entityName']) - ->setArguments([ - new PhpGenerator\PhpLiteral('$entityName'), - '@' . $this->prefix('entity.mapper'), - '@' . $this->prefix('entity.creator'), - '@' . $this->prefix('entity.updater'), - '@' . $this->prefix('entity.deleter'), - ]); - } + $builder->addFactoryDefinition($this->prefix('entity.creator')) + ->setImplement(Crud\Create\IEntityCreator::class) + ->setAutowired(FALSE) + ->getResultDefinition() + ->setType(Crud\Create\EntityCreator::class); + + $builder->addFactoryDefinition($this->prefix('entity.updater')) + ->setImplement(Crud\Update\IEntityUpdater::class) + ->setAutowired(FALSE) + ->getResultDefinition() + ->setFactory(Crud\Update\EntityUpdater::class); + + $builder->addFactoryDefinition($this->prefix('entity.deleter')) + ->setImplement(Crud\Delete\IEntityDeleter::class) + ->setAutowired(FALSE) + ->getResultDefinition() + ->setFactory(Crud\Delete\EntityDeleter::class); + + // Syntax sugar for config + $builder->addFactoryDefinition($this->prefix('crud')) + ->setImplement(Crud\IEntityCrudFactory::class) + ->setParameters(['entityName']) + ->getResultDefinition() + ->setType(Crud\EntityCrud::class) + ->setArguments([ + new PhpGenerator\PhpLiteral('$entityName'), + '@' . $this->prefix('entity.mapper'), + '@' . $this->prefix('entity.creator'), + '@' . $this->prefix('entity.updater'), + '@' . $this->prefix('entity.deleter'), + ]); } /** @@ -158,8 +127,15 @@ public function beforeCompile() : void $validator->addSetup('registerValidator', ['@' . $serviceName, $serviceName]); } - $builder->getDefinition($builder->getByType('Doctrine\ORM\EntityManagerInterface', TRUE)) - ->addSetup('?->getConfiguration()->addCustomStringFunction(?, ?)', ['@self', 'DATE_FORMAT', DoctrineCrud\StringFunctions\DateFormat::class]); + $builder->getDefinition($builder->getByType(Doctrine\ORM\EntityManagerInterface::class, TRUE)) + ->addSetup( + '?->getConfiguration()->addCustomStringFunction(?, ?)', + [ + '@self', + 'DATE_FORMAT', + DoctrineCrud\StringFunctions\DateFormat::class + ] + ); } /** @@ -168,8 +144,10 @@ public function beforeCompile() : void * * @return void */ - public static function register(Nette\Configurator $config, string $extensionName = 'doctrineCrud') : void - { + public static function register( + Nette\Configurator $config, + string $extensionName = 'doctrineCrud' + ) : void { $config->onCompile[] = function (Nette\Configurator $config, DI\Compiler $compiler) use ($extensionName) : void { $compiler->addExtension($extensionName, new DoctrineCrudExtension()); }; diff --git a/src/IPub/DoctrineCrud/Entities/TIdentifiedEntity.php b/src/IPub/DoctrineCrud/Entities/TIdentifiedEntity.php index 962fb69..afcb184 100644 --- a/src/IPub/DoctrineCrud/Entities/TIdentifiedEntity.php +++ b/src/IPub/DoctrineCrud/Entities/TIdentifiedEntity.php @@ -37,7 +37,7 @@ trait TIdentifiedEntity */ public function getId() { - return is_integer($this->id) ? $this->id : $this->id; + return $this->id; } /** diff --git a/src/IPub/DoctrineCrud/Helpers.php b/src/IPub/DoctrineCrud/Helpers.php index fc6917e..570df13 100644 --- a/src/IPub/DoctrineCrud/Helpers.php +++ b/src/IPub/DoctrineCrud/Helpers.php @@ -16,6 +16,10 @@ namespace IPub\DoctrineCrud; +use ReflectionException; +use ReflectionMethod; +use ReflectionParameter; + use IPub\DoctrineCrud\Exceptions; /** @@ -31,14 +35,16 @@ class Helpers /** * This method was inspired same method in Nette framework * - * @param \ReflectionMethod $method + * @param ReflectionMethod $method * @param array $arguments * * @return array * * @throws Exceptions\EntityCreationException + * + * @throws ReflectionException */ - public static function autowireArguments(\ReflectionMethod $method, array $arguments) : array + public static function autowireArguments(ReflectionMethod $method, array $arguments) : array { $optCount = 0; $num = -1; @@ -92,14 +98,14 @@ public static function autowireArguments(\ReflectionMethod $method, array $argum } /** - * @param \ReflectionParameter $param + * @param ReflectionParameter $param * * @return string|NULL */ - public static function getParameterType(\ReflectionParameter $param) : ?string + public static function getParameterType(ReflectionParameter $param) : ?string { if ($param->hasType()) { - $type = PHP_VERSION_ID >= 70100 ? $param->getType()->getName() : (string) $param->getType(); + $type = $param->getType()->getName(); return strtolower($type) === 'self' ? $param->getDeclaringClass()->getName() : $type; } diff --git a/src/IPub/DoctrineCrud/Mapping/EntityHydrator.php b/src/IPub/DoctrineCrud/Mapping/EntityHydrator.php index 89a3ccf..71b2c80 100644 --- a/src/IPub/DoctrineCrud/Mapping/EntityHydrator.php +++ b/src/IPub/DoctrineCrud/Mapping/EntityHydrator.php @@ -14,6 +14,8 @@ namespace IPub\DoctrineCrud\Mapping; +use ReflectionException; + use Doctrine\Common; use Doctrine\ORM; @@ -70,6 +72,9 @@ public function hydrate($values, Entities\IEntity $entity) : Entities\IEntity /** * {@inheritdoc} + * + * @throws Common\Annotations\AnnotationException + * @throws ReflectionException */ public function extract(Entities\IEntity $entity, int $maxLevel = 1, int $level = 1) : array { @@ -102,6 +107,9 @@ public function extract(Entities\IEntity $entity, int $maxLevel = 1, int $level /** * {@inheritdoc} + * + * @throws Common\Annotations\AnnotationException + * @throws ReflectionException */ public function simpleExtract(Entities\IEntity $entity) : array { @@ -138,6 +146,9 @@ public function simpleExtract(Entities\IEntity $entity) : array * @param int $level * * @return mixed|mixed[] + * + * @throws Common\Annotations\AnnotationException + * @throws ReflectionException */ private function extractor($value, int $maxLevel = 1, int $level = 1) { @@ -195,7 +206,7 @@ private function simpleExtractor($value) * * @return Nette\Reflection\Property[] * - * @throws \ReflectionException + * @throws ReflectionException */ private function getEntityProperties(Entities\IEntity $entity) : array { diff --git a/src/IPub/DoctrineCrud/Mapping/EntityMapper.php b/src/IPub/DoctrineCrud/Mapping/EntityMapper.php index 140b8d9..d453688 100644 --- a/src/IPub/DoctrineCrud/Mapping/EntityMapper.php +++ b/src/IPub/DoctrineCrud/Mapping/EntityMapper.php @@ -16,11 +16,18 @@ namespace IPub\DoctrineCrud\Mapping; +use phpDocumentor; + +use ReflectionClass; +use ReflectionException; +use ReflectionMethod; +use ReflectionProperty; +use Reflector; + use Doctrine\Common; use Doctrine\ORM; use Nette; -use Nette\Reflection; use Nette\Utils; use IPub\DoctrineCrud\Entities; @@ -28,7 +35,6 @@ use IPub\DoctrineCrud\Helpers; use IPub\DoctrineCrud\Mapping; use IPub\DoctrineCrud\Validation; -use Tracy\Debugger; /** * Doctrine CRUD entity mapper @@ -77,10 +83,12 @@ public function __construct( /** * {@inheritdoc} + * + * @throws ReflectionException */ public function fillEntity(Utils\ArrayHash $values, Entities\IEntity $entity, bool $isNew = FALSE) : Entities\IEntity { - $reflectionClass = new Reflection\ClassType(get_class($entity)); + $reflectionClass = new ReflectionClass(get_class($entity)); // Hack for proxy classes... if ($reflectionClass->implementsInterface(Common\Proxy\Proxy::class)) { @@ -97,22 +105,22 @@ public function fillEntity(Utils\ArrayHash $values, Entities\IEntity $entity, bo $reflectionProperties = []; try { - $ref = new \ReflectionClass($entityClass); + $ref = new ReflectionClass($entityClass); foreach ($ref->getProperties() as $reflectionProperty) { $reflectionProperties[] = $reflectionProperty->getName(); } - } catch (\ReflectionException $ex) { + } catch (ReflectionException $ex) { // Nothing to do here } foreach (array_unique(array_merge($reflectionProperties, $classMetadata->getFieldNames(), $classMetadata->getAssociationNames())) as $fieldName) { try { - $propertyReflection = new Nette\Reflection\Property($entityClass, $fieldName); + $propertyReflection = new ReflectionProperty($entityClass, $fieldName); - } catch (\ReflectionException $ex) { + } catch (ReflectionException $ex) { // Entity property is readonly continue; } @@ -149,7 +157,7 @@ public function fillEntity(Utils\ArrayHash $values, Entities\IEntity $entity, bo $items = []; if (is_string($className) && class_exists($className) && ($value instanceof Utils\ArrayHash || is_array($value))) { - $rc = new \ReflectionClass($className); + $rc = new ReflectionClass($className); $subClassIdProperty = NULL; @@ -173,12 +181,12 @@ public function fillEntity(Utils\ArrayHash $values, Entities\IEntity $entity, bo $subClassName = $className; - $rc = new \ReflectionClass($className); + $rc = new ReflectionClass($className); if ($rc->isAbstract() && isset($item['entity']) && class_exists($item['entity'])) { $subClassName = $item['entity']; - $rc = new \ReflectionClass($subClassName); + $rc = new ReflectionClass($subClassName); } if ($subClassIdProperty !== NULL && $item->offsetExists($subClassIdProperty)) { @@ -215,7 +223,7 @@ public function fillEntity(Utils\ArrayHash $values, Entities\IEntity $entity, bo $className = $this->annotationReader->getPropertyAnnotation($propertyReflection, ORM\Mapping\ManyToOne::class)->targetEntity; } else { - $varAnnotation = $propertyReflection->getAnnotation('var'); + $varAnnotation = $this->parseAnnotation($propertyReflection, 'var'); $className = NULL; @@ -234,11 +242,11 @@ public function fillEntity(Utils\ArrayHash $values, Entities\IEntity $entity, bo && class_exists($className) && ($value instanceof Utils\ArrayHash || is_array($value)) ) { - $rc = new \ReflectionClass($className); + $rc = new ReflectionClass($className); if ($rc->isAbstract() && isset($value['entity']) && class_exists($value['entity'])) { $className = $value['entity']; - $rc = new \ReflectionClass($value['entity']); + $rc = new ReflectionClass($value['entity']); } if ($constructor = $rc->getConstructor()) { @@ -261,7 +269,7 @@ public function fillEntity(Utils\ArrayHash $values, Entities\IEntity $entity, bo } } else { - $varAnnotation = $propertyReflection->getAnnotation('var'); + $varAnnotation = $this->parseAnnotation($propertyReflection, 'var'); $className = $varAnnotation; @@ -279,11 +287,11 @@ public function fillEntity(Utils\ArrayHash $values, Entities\IEntity $entity, bo && ($value instanceof Utils\ArrayHash || is_array($value)) ) { if (class_exists($className)) { - $rc = new \ReflectionClass($className); + $rc = new ReflectionClass($className); if ($rc->isAbstract() && isset($value['entity']) && class_exists($value['entity'])) { $className = $value['entity']; - $rc = new \ReflectionClass($value['entity']); + $rc = new ReflectionClass($value['entity']); } if ($constructor = $rc->getConstructor()) { @@ -297,7 +305,7 @@ public function fillEntity(Utils\ArrayHash $values, Entities\IEntity $entity, bo } elseif (isset($value['entity']) && class_exists($value['entity'])) { $className = $value['entity']; - $rc = new \ReflectionClass($value['entity']); + $rc = new ReflectionClass($value['entity']); if ($constructor = $rc->getConstructor()) { $subEntity = $rc->newInstanceArgs(Helpers::autowireArguments($constructor, array_merge((array) $value, ['parent_entity' => $entity]))); @@ -340,7 +348,7 @@ private function setFieldValue(ORM\Mapping\ClassMetadata $classMetadata, Entitie } try { - $propertyReflection = new Nette\Reflection\Method(get_class($entity), $methodName); + $propertyReflection = new ReflectionMethod(get_class($entity), $methodName); //if (!$this->validators->validate($value, $propertyReflection)) { // // Validation fail @@ -356,7 +364,7 @@ private function setFieldValue(ORM\Mapping\ClassMetadata $classMetadata, Entitie } // Fallback for missing setter - } catch (\ReflectionException $ex) { + } catch (ReflectionException $ex) { $classMetadata->setFieldValue($entity, $field, $value); } } @@ -366,10 +374,12 @@ private function setFieldValue(ORM\Mapping\ClassMetadata $classMetadata, Entitie * @param string $className * * @return string + * + * @throws ReflectionException */ private function findAttributeName(Entities\IEntity $entity, string $className) : string { - $rc = new \ReflectionClass($className); + $rc = new ReflectionClass($className); foreach ($rc->getProperties() as $property) { $propertyAnnotations = $this->annotationReader->getPropertyAnnotations($property); @@ -397,4 +407,24 @@ private function findAttributeName(Entities\IEntity $entity, string $className) return 'parent_entity'; } + + /** + * @param Reflector $ref + * @param string $name + * + * @return string|NULL + */ + private function parseAnnotation(Reflector $ref, string $name) : ?string + { + $factory = phpDocumentor\Reflection\DocBlockFactory::createInstance(); + $docblock = $factory->create($ref->getDocComment()); + + foreach ($docblock->getTags() as $tag) { + if ($tag->getName() === $name) { + return trim((string) $tag); + } + } + + return NULL; + } } diff --git a/tests/IPubTests/DoctrineCrud/CRUDTest.phpt b/tests/IPubTests/DoctrineCrud/CRUDTest.phpt index fa06e4a..ff49276 100644 --- a/tests/IPubTests/DoctrineCrud/CRUDTest.phpt +++ b/tests/IPubTests/DoctrineCrud/CRUDTest.phpt @@ -28,6 +28,8 @@ use Nettrine; use Tester; use Tester\Assert; +use IPub\DoctrineCrud; + use IPubTests\DoctrineCrud\Models; require __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'bootstrap.php'; @@ -253,13 +255,9 @@ class CRUDTest extends Tester\TestCase $config->addParameters(['appDir' => $rootDir, 'wwwDir' => $rootDir]); $config->addConfig(__DIR__ . DS . 'files' . DS . 'config.neon'); + $config->addConfig(__DIR__ . DS . 'files' . DS . 'entities.neon'); - if (getenv('NETTE') === 'default') { - $config->addConfig(__DIR__ . DS . 'files' . DS . 'entities.neon'); - - } else { - $config->addConfig(__DIR__ . DS . 'files' . DS . 'entities24.neon'); - } + DoctrineCrud\DI\DoctrineCrudExtension::register($config); return $config->createContainer(); } diff --git a/tests/IPubTests/DoctrineCrud/ExtensionTest.phpt b/tests/IPubTests/DoctrineCrud/ExtensionTest.phpt index d681c35..9f8ff01 100644 --- a/tests/IPubTests/DoctrineCrud/ExtensionTest.phpt +++ b/tests/IPubTests/DoctrineCrud/ExtensionTest.phpt @@ -60,6 +60,8 @@ class ExtensionTest extends Tester\TestCase $config->addConfig(__DIR__ . DS . 'files' . DS . 'config.neon'); + DoctrineCrud\DI\DoctrineCrudExtension::register($config); + return $config->createContainer(); } } diff --git a/tests/IPubTests/DoctrineCrud/files/config.neon b/tests/IPubTests/DoctrineCrud/files/config.neon index 245f288..9158e3b 100644 --- a/tests/IPubTests/DoctrineCrud/files/config.neon +++ b/tests/IPubTests/DoctrineCrud/files/config.neon @@ -2,20 +2,34 @@ php: date.timezone: Europe/Prague extensions: - dbal: Nettrine\DBAL\DI\DbalExtension - orm: Nettrine\ORM\DI\OrmExtension - orm.annotations: Nettrine\ORM\DI\OrmAnnotationsExtension - orm.cache: Nettrine\ORM\DI\OrmCacheExtension - doctrineCrud: IPub\DoctrineCrud\DI\DoctrineCrudExtension + contributteConsole : Contributte\Console\DI\ConsoleExtension(%consoleMode%) + nettrineAnnotations : Nettrine\Annotations\DI\AnnotationsExtension + nettrineCache : Nettrine\Cache\DI\CacheExtension + nettrineDbal : Nettrine\DBAL\DI\DbalExtension + nettrineOrm : Nettrine\ORM\DI\OrmExtension + nettrineOrmAnnotations : Nettrine\ORM\DI\OrmAnnotationsExtension + nettrineOrmConsole : Nettrine\ORM\DI\OrmConsoleExtension + nettrineOrmCache : Nettrine\ORM\DI\OrmCacheExtension -dbal: +contributteConsole: + name: iPublikuj:Packages! + version: '1.0' + catchExceptions: true + autoExit: true + url: http://example.com + lazy: false + helperSet: \Symfony\Component\Console\Helper\HelperSet + helpers: [] + +nettrineDbal: connection: host: 127.0.0.1 driver: pdo_sqlite memory: true -orm.annotations: - defaultCache: array +nettrineAnnotations: + debug: %debugMode% -orm.cache: - defaultDriver: array +nettrineOrm: + configuration: + proxyDir : %tempDir%/cache/doctrine.proxies diff --git a/tests/IPubTests/DoctrineCrud/files/entities.neon b/tests/IPubTests/DoctrineCrud/files/entities.neon index 8610ca5..b9fa5b6 100644 --- a/tests/IPubTests/DoctrineCrud/files/entities.neon +++ b/tests/IPubTests/DoctrineCrud/files/entities.neon @@ -11,6 +11,6 @@ services: articlesManager: factory: IPubTests\DoctrineCrud\Models\ArticlesManager(@articleCrud) -orm.annotations: +nettrineOrmAnnotations: paths: - %appDir%IPubTests/DoctrineCrud/models diff --git a/tests/IPubTests/DoctrineCrud/files/entities24.neon b/tests/IPubTests/DoctrineCrud/files/entities24.neon deleted file mode 100644 index adc3f38..0000000 --- a/tests/IPubTests/DoctrineCrud/files/entities24.neon +++ /dev/null @@ -1,16 +0,0 @@ -services: - userCrud: - factory: @doctrineCrud.crud::create(IPubTests\DoctrineCrud\Models\UserEntity) - - articleCrud: - factory: @doctrineCrud.crud::create(IPubTests\DoctrineCrud\Models\ArticleEntity) - - usersManager: - class: IPubTests\DoctrineCrud\Models\UsersManager(@userCrud) - - articlesManager: - class: IPubTests\DoctrineCrud\Models\ArticlesManager(@articleCrud) - -orm.annotations: - paths: - - %appDir%IPubTests/DoctrineCrud/models diff --git a/tests/php.ini-unix b/tests/php.ini-unix index cdcc67b..071d34d 100644 --- a/tests/php.ini-unix +++ b/tests/php.ini-unix @@ -1,8 +1,11 @@ -extension = xdebug.so -extension = json.so extension = pdo.so extension = pdo_sqlite.so extension = sqlite.so +extension = iconv.so +extension = tokenizer.so +extension = json.so +extension = ctype.so +extension = xdebug.so [xdebug] xdebug.enable = On diff --git a/tests/php.ini-win b/tests/php.ini-win index f5c89d0..650293d 100644 --- a/tests/php.ini-win +++ b/tests/php.ini-win @@ -1,7 +1,10 @@ [PHP] extension_dir = "./ext" -extension = php_xdebug.dll -extension = php_json.dll extension = php_pdo.dll extension = php_pdo_sqlite.dll -extension = php_sqlite..dll +extension = php_sqlite.dll +extension = iconv.dll +extension = tokenizer.dll +extension = json.dll +extension = ctype.dll +extension = xdebug.dll