Support the ongoing development of Laravel.io →
Installation IOC Packages
Last updated 2 years ago.
0

Have you defined psr-4/psr-0 in package composer json file for Myriad\Squire?

Last updated 9 years ago.
0

"psr-4": { "Myriad\Squire\": "path here" },

0

I think you need double backslash in psr4.

Myriad\\Squire\\
Last updated 9 years ago.
0

makzumi said:

I think you need double backslash in psr4.

Myriad\\Squire\\

Thanks, that's what I have. It works after the initial pull, so I don't think it's a composer issue. I also checked the generated psr4 autoload file and the namespace and path are correct. I'm starting to wonder if this is a Laravel issue.

0

Additionally, if I comment out the service provider, I can still do this:

  $provider = new \Myriad\Squire\SquireServiceProvider(app());
  dd($provider);
SquireServiceProvider {#137 ▼
  #defer: true
  #app: Application {#2 ▼
    #basePath: "/Users/croemmich/Development/myriad/laravel5-starter"
    #hasBeenBootstrapped: true
    #booted: true
    #bootingCallbacks: []
    #bootedCallbacks: []
    #terminatingCallbacks: []
    #serviceProviders: array:19 [▶]
    #loadedProviders: array:19 [▶]
    #deferredServices: array:85 [▶]
    #monologConfigurator: null
    #databasePath: null
    #storagePath: null
    #environmentPath: null
    #environmentFile: ".env"
    #namespace: null
    #resolved: array:32 [▶]
    #bindings: array:41 [▶]
    #instances: array:27 [▶]
    #aliases: array:56 [▶]
    #extenders: []
    #tags: []
    #buildStack: []
    +contextual: []
    #reboundCallbacks: array:2 [▶]
    #globalResolvingCallbacks: []
    #globalAfterResolvingCallbacks: []
    #resolvingCallbacks: array:1 [▶]
    #afterResolvingCallbacks: array:1 [▶]
  }
}
Last updated 9 years ago.
0

Ok.. I'm dumb.. and something is magic.

I had "Myriad\\Squire\\": "src/" which was wrong as my package files were in a subdirectory of source. I moved them where they should have been which fixed my issue. However, I'm still dumbfounded as to how php found them later in the runtime.

Thanks!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

croemmich croemmich Joined 11 Jul 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.