Skip to content

Updated installation instructions for lazy services #2778

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

Closed
wants to merge 5 commits into from
Closed

Updated installation instructions for lazy services #2778

wants to merge 5 commits into from

Conversation

peterrehm
Copy link
Contributor

If you use the full stack framework the proxy-manager-bridge is already included.
Therefore just the actual proxy-manager bundle needs to be installed and this
is adjusted with this PR.

the above command does).
If you're using the full-stack framework, the proxy manager bridge is already
included but the actual proxy manager needs to be included. Therefore add

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing .. code-block:: json

@wouterj
Copy link
Member

wouterj commented Jun 28, 2013

/cc @Ocramius

@Ocramius
Copy link
Contributor

@wouterj that's a bit debated. The problem is that installing symfony/symfony doesn't drag in proxy-manager, while installing only this bridge, it gets dragged in. The documentation change is correct.

@Ocramius
Copy link
Contributor

Actually, can you include 0.4.* in the docs? I'm gonna release it very soon and it doesn't cause breaks in this functionality :)

@wouterj
Copy link
Member

wouterj commented Jun 28, 2013

thank you for claryfing this @Ocramius . I knew you had some debate on the original PR about this one, but I didn't really follow that discussion that's why I pinged you.

If you're using the full-stack framework, the proxy manager bridge is already
included but the actual proxy manager needs to be included. Therefore add

"ocramius/proxy-manager": ">=0.3.1,<0.4-dev"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about:

.. code-block:: json

    "require": {
        "ocramius/proxy-manager": "0.4.*"
    }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.3.1 is also in the working range. I don't see any problems with it though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I was not clear. I meaned the require block around it

@peterrehm
Copy link
Contributor Author

Ok, just added as @wouterj mentioned. In general I had issues with the "missing" dependency, wouldn't it be a good solution if you get a warning if you set lazy: true to a service and you have not installed the proxy manager?

Otherwise people intend to use the lazy services and they are silently not available.

( symfony/symfony#7890 )

In addition to that Fabien was mentioning in his blog post about the draw backs of lazy services (http://symfony.com/blog/new-in-symfony-2-3-what-else), should we mention something about this as well?
Therefore I would need your support @Ocramius, this was the reason I was pinging you on IRC.

@peterrehm
Copy link
Contributor Author

@Ocramius I have added the information about how to check if it works based on the interface.

.. code-block:: php
var_dump(class_implements($service));

If the class implements the ProxyManager\Proxy\LazyLoadingInterface your lazy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the FQCN should be in a literal (double quotes)

@peterrehm
Copy link
Contributor Author

@wouterj Updated as per your request. From my side it is good to be merged into 2.3.x and master.

@wouterj
Copy link
Member

wouterj commented Jun 29, 2013

👍 thanks for contributing!

@qpleple
Copy link

qpleple commented Jul 12, 2013

+1 for this update in the doc
Indeed, working with the standard edition, following the current doc (just adding symfony/proxy-manager-bridge to composer) is not sufficient. Package ocramius/proxy-manager is needed as well.

@weaverryan
Copy link
Member

Great job Peter and everyone else! I've patched this into the 2.3 branch - it's a very very good improvement!

Cheers!

@weaverryan weaverryan closed this Jul 18, 2013
weaverryan added a commit that referenced this pull request Jul 19, 2013
@peterrehm peterrehm deleted the patch-3 branch August 23, 2014 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants