Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Rob Frawley 2nd
@robfrawley
@Ocramius Sorry, been horribly busy and just starting to use this new Git chat service here. ;-)
It'll be a priority for me in the coming months, so you'll likely see some bug reports and/or pull requests before the end of the year.
Marco Pivetta
@Ocramius
@robfrawley no problem: I also join gitter only when I get notifications via mail
Thanks if you report/fix anything :-) I really need zendframework/zend-code to get better at this stuff
Asked @steverhoades about it at ZendCon, he may work on it in the near future
(mainly moving to AST-based stuff
Alabme
@Alabme
@Ocramius Hi, I have some issue on live system with ProxyManager. I've tried to figure this out but I can't see what i'm doing wrong.
Message: Fatal Error (E_COMPILE_ERROR): require_once(): Failed opening required './data/cache/ProxyManagerGeneratedProxy__PM__OffersInfrastructureOffersServiceDeleteLoadOfferServiceGeneratedbd3bd5a5f5bff638fbf938a95b07962d.php' message: require_once(): Failed opening required './data/cache/ProxyManagerGeneratedProxy__PM__OffersInfrastructureOffersServiceDeleteLoadOfferServiceGeneratedbd3bd5a5f5bff638fbf938a95b07962d.php' file: ./vendor/ocramius/proxy-manager/src/ProxyManager/Autoloader/Autoloader.php line: 67
any idea?
Jefersson Nathan
@malukenho
@Alabme the file ./data/cache/ProxyManagerGeneratedProxy__PM__OffersInfrastructureOffersServiceDeleteLoadOfferServiceGeneratedbd3bd5a5f5bff638fbf938a95b07962d.php exists?
Alabme
@Alabme
It happens while deploying codes to production, than everything in data/cache is removed
also it's only occurs while we have about 10req/s
Jefersson Nathan
@malukenho
@Alabme could you please open an issue and provide the maximum details about it?
Alabme
@Alabme
@malukenho ok, will do it, thx for response
Marco Pivetta
@Ocramius
@Alabme please also mention the PHP version in use
Daniel Bannert
@prisis
@Ocramius Hey :), small question for now i cant use ProxyManager and BetterReflection together because of the zendcode version, its okay if i make a pullrequest for the version update?
Marco Pivetta
@Ocramius
@prisis ocramius/proxy-manager:2.0.* needs zendframework/zend-code:3.*. You should do a PR against roave/better-reflection to make it support zendframework/zend-code:3.* (should be quick)
Sandro Keil
@sandrokeil
Hello, I use Zend ServiceManager 3.0 with Lazy Services and Delegators and ProxyManager 2.0 and it works fine. Currently i see no way to generate the proxies for production, because the Zend Service Manager setting write_proxy_files doesn't work, because I can not configure the generating strategy. Have I missed something?
Marco Pivetta
@Ocramius
@sandrokeil by default, ProxyManager won't write files in 2.x
I think I wrote a patch for it at some point...
Sandro Keil
@sandrokeil
Yes, I know that. Maybe we should patch Zend ServiceManager. So it creates the FileWriterGeneratorStrategy if write_proxy_files === true? I'm not sure if it is a ProxyManager patch or Zend ServiceManager patch.
Marco Pivetta
@Ocramius
lemme check the tests
damn, the docs seem to be incomplete
@sandrokeil what does your LazyServiceFactory instantiation logic look like?
Sandro Keil
@sandrokeil
here is it
'lazy_services' => [
            // Mapping services to their class names is required
            // since the ServiceManager is not a declarative DIC.
            'class_map' => [
                Zend\Expressive\Template\TemplateRendererInterface::class => Zend\Expressive\Template\TemplateRendererInterface::class,
            ],
            // directory where proxy classes will be written - default to system_get_tmp_dir()
            'proxies_target_dir' => 'data/cache/proxymanager',

            // namespace of the generated proxies, default to "ProxyManagerGeneratedProxy"
            'proxies_namespace' => 'ProxyManagerGeneratedProxy',

            // whether the generated proxy classes should be written to disk or generated on-the-fly
            'write_proxy_files' => true,
        ],
        'delegators' => [
            // we don't need the template renderer every request e.g. POST and we can initialize the locale via a middleware
            // the problem is that Twig loads all extensions if the render is created
            Zend\Expressive\Template\TemplateRendererInterface::class => [
                \Zend\ServiceManager\Proxy\LazyServiceFactory::class,
            ],
        ],
Sandro Keil
@sandrokeil
Marco Pivetta
@Ocramius
@sandrokeil zendframework/zend-servicemanager#103
not merged yet - that's what you need there
Sandro Keil
@sandrokeil
I'm so sorry, I didn't see that. Thank you very much
Marco Pivetta
@Ocramius
@sandrokeil btw, I think it's simply @weierophinney having limited time atm
Sandro Keil
@sandrokeil
ok, no problem.
Bogdan Rancichi
@devrck
Hi @Ocramius
I have an issue with the proxy generator in version 1
Or that is the design of it :D
You suggested to move to version 2 but that it still not a option for me
Bogdan Rancichi
@devrck
I can "write" the value of a protected attribute without triggering lazy loading
But when i retrieve it
It will trigger the lazy loading even if the value is already set
How can I overcome this behaviour?
Marco Pivetta
@Ocramius
@devckonem I would suggest a functional test for it
see if you can write one that fits your 1.0.x use-case
but remember: I'm not providing anything but security issue fixes for ProxyManager 1.x
Bogdan Rancichi
@devrck
@Ocramius thank you for your suggestion and I understand that you'll only fix security issues :smile:
napestershine
@napestershine
HI I am getting this error on my linux machine
ocramius/proxy-manager 2.0.x-dev requires php 7.0.0 - 7.0.5 || ^7.0.7 -> your PHP version (7.0.6) does not satisfy that requirement
Jefersson Nathan
@malukenho
@napestershine
upgrade your php version to 7.0.7
version 7.0.6 is skipped by ProxyManager due some php internal errors using reflection
napestershine
@napestershine
@malukenho Thakns solved :)