You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If it helps, the following seems to fix the problem: while ($this->lexer->lookahead!==null && $this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value']))
I'm using version 1.10.2 and it's failing in other line:
[ErrorException]
Trying to access array offset on value of type null
in /code/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:1047
Anyone hava a solution?
I'm following this guide AKENEO DOCS and when I run php app/console cache:clear --env=prod got the error
Clearing the cache for the prod environment with debug false
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /root/pim-community-standard/vendor/symfony/monolog-bundle/DependencyInjection/Configuration.php on line 594
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /root/pim-community-standard/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2635
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Notice: Trying to access array offset on value of type null in /root/pim-community-standard/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 967
PHP Fatal error: Declaration of Pim\Bundle\CatalogBundle\Doctrine\ORM\Repository\LocaleRepository::findBy(array $criteria, array $orderBy = Array, $limit = NULL, $offset = NULL) must be compatible with Doctrine\ORM\EntityRepository::findBy(array $criteria, ?array $orderBy = NULL, $limit = NULL, $offset = NULL) in /root/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/CatalogBundle/Doctrine/ORM/Repository/LocaleRepository.php on line 23
[2021-06-15 16:00:07] php.CRITICAL: Fatal Compile Error: Declaration of Pim\Bundle\CatalogBundle\Doctrine\ORM\Repository\LocaleRepository::findBy(array $criteria, array $orderBy = Array, $limit = NULL, $offset = NULL) must be compatible with Doctrine\ORM\EntityRepository::findBy(array $criteria, ?array $orderBy = NULL, $limit = NULL, $offset = NULL) {"type":64,"file":"/root/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/CatalogBundle/Doctrine/ORM/Repository/LocaleRepository.php","line":23,"level":6143,"stack":[]} []
[Symfony\Component\Debug\Exception\FatalErrorException]
Compile Error: Declaration of Pim\Bundle\CatalogBundle\Doctrine\ORM\Repository\LocaleRepository::findBy(array $criteria, array $orderBy = Array, $limit = NULL, $offset = NULL) must be compatible with Doctri
ne\ORM\EntityRepository::findBy(array $criteria, ?array $orderBy = NULL, $limit = NULL, $offset = NULL)
cache:clear [--no-warmup] [--no-optional-warmers]
Current PHP version is 7.4, should I downgrade to 7.3 or upgrade to 8?
Activity
Ocramius commentedon Jul 12, 2019
Ref:
annotations/lib/Doctrine/Annotations/DocParser.php
Line 983 in 793b91a
do not fail on php 7.4
rbairwell commentedon Jul 31, 2019
If it helps, the following seems to fix the problem:
while ($this->lexer->lookahead!==null && $this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value']))
Tobion commentedon Aug 6, 2019
Symfony also has alot of failures in php 7.4 due to this, ref. symfony/symfony#32844
T_IDENTIFIER
capture groups, leading to simpler token sequences #25812 remaining items
javiyt commentedon Oct 15, 2020
I'm using version 1.10.2 and it's failing in other line:
SuperlativeEntity commentedon Oct 19, 2020
@javiyt Did you resolve the issue?
javiyt commentedon Oct 19, 2020
No
SuperlativeEntity commentedon Oct 20, 2020
Might be easier to just log a separate issue.
grrenier commentedon Oct 22, 2020
This fixed the issue in my case:
while (isset($this->lexer->lookahead['position']) && $this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value']))
SuperlativeEntity commentedon Nov 10, 2020
We can't just edit the vendor files, it needs to be fixed in the package.
Ocramius commentedon Nov 10, 2020
Hey folks: posting here won't help.
Please raise a new issue with associated failing test case, so it can be solved there.
wiistriker commentedon Feb 16, 2021
still error on php 7.4
ma-gu-16 commentedon Mar 3, 2021
Confirm, still error on PHP 7.4 and current symfony flex doctrine/orm v 2.7.5
PHP 7.4: require doctrine/annotations 1.7+
thewasta commentedon Jun 15, 2021
Anyone hava a solution?
I'm following this guide AKENEO DOCS and when I run
php app/console cache:clear --env=prod
got the errorCurrent PHP version is 7.4, should I downgrade to 7.3 or upgrade to 8?
Ocramius commentedon Jun 15, 2021
@thewasta please report it to
akeneo/pim-community-dev
- it has nothing to do withdoctrine/annotations
.