Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/diPublic
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Compiler::loadDefinitions: allow to get to existing service by class#145

Closed

Conversation

matej21
Copy link
Contributor

  • bug fix? no
  • new feature? yes
  • BC break? no

it is useful when you want to modify anonymous service in your local.neon

JanTvrdik and olsavmic reacted with thumbs up emoji
@matej21matej21force-pushed thefeature/config-service-by-class branch frombe48786 to6339d48CompareFebruary 27, 2017 15:23
@TomasVotruba
Copy link
Contributor

Interesting. What is your specific use case?

@matej21matej21force-pushed thefeature/config-service-by-class branch from6339d48 tob592489CompareFebruary 27, 2017 17:29
@dgdg closed this in4eb358dFeb 27, 2017
@@ -257,7 +257,13 @@ public function generateCode(): array
public static function loadDefinitions(ContainerBuilder $builder, array $services, string $namespace = NULL)
{
foreach ($services as $name => $def) {
if ((string) (int) $name === (string) $name) {
if (is_string($name) && preg_match('#^@\w*[\\\][\w\\\]+\z#', $name)) {
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

if (is_int($name)) {    ....} elseif (preg_match(....)) {   ....}

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dgdgdg left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@matej21@TomasVotruba@dg

[8]ページ先頭

©2009-2025 Movatter.jp