flow-development-collection: cannot build interceptor code for private method BrowserState::initializeData()

Description

Updated a new Neos instance (Neos 5.3.0 and Flow 6.3.1 => 6.3.2) and ran ./flow package: rescan. Get the following error.

The Neos\Flow\Aop\Builder\AdvicedMethodInterceptorBuilder cannot build interceptor code for private method Neos\Media\Browser\Domain\Session\BrowserState::initializeData().
Please change the scope to at least protected or adjust the pointcut
expression in the corresponding aspect.
  Type: Neos\Flow\Aop\Exception
  Code: 1593070574
  File:
Packages/Framework/Neos.Flow/Classes/Aop/Builder/AdvicedMethodInterceptorBu
        ilder.php
  Line: 42
Open Data/Logs/Exceptions/20201029091519918cd4.txt for a full stack
trace.
  Type: Neos\Flow\Core\Booting\Exception\SubProcessException
  Code: 1355480641
  File: Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php
  Line: 699
Open Data/Logs/Exceptions/20201029091518caed70.txt for a full stack trace.

Affected Versions

Neos: 5.3.0

Flow: 6.3.2

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Adding some

        if (!is_callable([$className, $methodName])) {
            return false;
        }

there seems to do the trick but I’m not sure if that’s the best way to go

That being said, in https://github.com/neos/flow-development-collection/blob/d291ccf0c8c30237d5b75cc82e4324fdbdddebd0/Neos.Flow/Classes/Session/Aspect/SessionObjectMethodsPointcutFilter.php#L65 the expression should be ^(?:__wakeup|__construct|__destruct|__sleep|__serialize|__unserialize|__clone|shutdownObject|initializeObject|inject.*)$ (added grouping), to make ^ and $ work with all alternatives!

Screenshot 2020-10-29 at 10 20 08