Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Access level to InterpolatorFactory::$mapper must be protected (as in class AbstractFactory) or weaker #15036

Closed
sergeyklay opened this issue May 13, 2020 · 1 comment · Fixed by #15037
Assignees
Labels
bug A bug report status: low Low

Comments

@sergeyklay
Copy link
Member

sergeyklay commented May 13, 2020

Access level to InterpolatorFactory::$mapper :

class InterpolatorFactory extends AbstractFactory
{
/**
* @var array
*/
private mapper = [];

must be protected (as in class AbstractFactory) or weaker:

abstract class AbstractFactory
{
/**
* @var array
*/
protected mapper = [];

Current implementation leads to a fatal error using Zephir 0.12.19:

1) NewInstanceCest: Test Translate\TranslateFactory - newInstance()
 Test  tests/unit/Translate/TranslateFactory/NewInstanceCest.php:translateTranslateFactoryNewInstance
                                                                                         
  [Error] Cannot access private property Phalcon\Translate\InterpolatorFactory::$mapper  
                                                                                         
#1  Phalcon\Factory\AbstractFactory->init
#2  /mnt/work/phalcon/cphalcon/tests/unit/Translate/TranslateFactory/NewInstanceCest.php:37
#3  Phalcon\Test\Unit\Translate\TranslateFactory\NewInstanceCest->translateTranslateFactoryNewInstance
@sergeyklay sergeyklay added bug A bug report status: unverified Unverified labels May 13, 2020
@sergeyklay sergeyklay self-assigned this May 13, 2020
@sergeyklay sergeyklay removed the status: unverified Unverified label May 13, 2020
@sergeyklay sergeyklay added this to Working on it in Phalcon Roadmap May 13, 2020
@sergeyklay sergeyklay linked a pull request May 13, 2020 that will close this issue
5 tasks
@sergeyklay
Copy link
Member Author

Fixed in 4.0.x branch

Phalcon Roadmap automation moved this from Working on it to Implemented May 13, 2020
niden pushed a commit that referenced this issue May 16, 2020
@niden niden moved this from Implemented to Released in Phalcon Roadmap May 18, 2020
niden pushed a commit that referenced this issue May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: low Low
Projects
Archived in project
Phalcon Roadmap
  
Released
Development

Successfully merging a pull request may close this issue.

1 participant