autoload Questions
8
Solved
This is a repeat question - eg:
Laravel 4 migrations - class not found
However, I've tried every solution (from every forum I could find) and cannot figure this out.
Scenario
I created a Laravel...
Aloke asked 3/4, 2014 at 6:53
2
Solved
When running composer's update, install, require, dump-autoload, etc.; I suddenly start getting a yellow deprecation notice that says:
Class Foo\Bar\Baz located in ./foo/bar/utility/baz.php does n...
Patel asked 22/9, 2020 at 12:54
5
Example:
ClassName.php
<?php echo "This will crash all"; ?>
In another file...
foreach ($FILENAMES_WITHOUT_DOT_PHP as $name => $value) {
if (class_exists( $value )) {
echo "ClassNam...
13
Solved
I've upgraded one of my apps from Rails 4.2.6 to Rails 5.0.0. The Upgrade Guide says, that the Autoload feature is now disabled in production by default.
Now I always get an error on my production...
Inquietude asked 5/7, 2016 at 8:30
0
I just upgraded an Engine from Rails 5 to Rails 7. This error started appearing at Rails 6.1.7.6, but I thought perhaps it might've been fixed in Rails 7.
Here's the error I get when I run rspec
An...
Twinscrew asked 25/8, 2023 at 18:3
15
Solved
I added new controller in /app/controllers/admin/ folder and added the route in /app/routes.php file as well. Then i run the following command to autoload them
php artisan dump-autoload
I got th...
Pulling asked 19/2, 2015 at 6:23
2
I'm just getting started using composer for dependency management and I'm having a hard time figuring out how I'm not adhering to psr-4 for autoloading so I'm here for advice. I've got a class that...
Elga asked 24/6, 2014 at 17:26
7
Solved
I understand that you can use either a PSR standard to locate files, or tell composer a directory to scan for classes. The documentation recommends using the PSR-4 standard. There is also an option...
Bade asked 2/4, 2014 at 6:42
1
Solved
I'm working on a package for an internal Laravel application and I'm having trouble running a seeder that exists in the package directory.
In my package's composer.json file located in packages/ven...
Lawford asked 5/1, 2023 at 19:29
3
Solved
Is it possible in the current stable version of the Zend Framework (1.11), to work with application classes using PHP namespaces?
Application\Form\Abc instead of Application_Form_Abc
Application\M...
Pod asked 28/6, 2011 at 21:53
2
Solved
I'm upgrading our app from rails 6 to 7, I was using zeitwerk instead of the classic autoloader with rails 6 without any issues, now without any changes to the folder/file naming convention or stru...
Makeyevka asked 2/3, 2022 at 6:39
3
I'm using composer in my latest project and mapping my function like this
"require": {
...
},
"require-dev": {
...
},
"autoload": {
"psr-4": {
...
},
"files": [
"src/function/test-function....
Brigettebrigg asked 3/10, 2014 at 6:6
4
Solved
I am learning advanced PHP standards and trying to implement new and useful methods. Earlier I was using __autoload just to escape including multiple files on each page, but recently I have seen a ...
4
Solved
I have legacy project which has declartions and class usings in different cases.
I want upgrade source to modern state. First I want to replace legacy autoloading by composer autoloading. But com...
Shang asked 27/11, 2013 at 7:2
5
Solved
I want IPython or the Python interpreter to auto-load a module when I start them.
Is it possible?
For example when I start IPython:
$ ipython
...
>>> from __future__ import division...
2
Solved
I am using Docker Desktop for Mac to containerize a basic LAMP stack in my local environment, then periodically deploying a simple MVC application to a shared Linux server using a Bitbucket pipelin...
3
The Rails 6+ default autoloader is zeitwerk, which seems like a great improvement over previous approaches.
However, zeitwork follows the convention for Rails projects that anything in app/* is au...
Afloat asked 21/11, 2019 at 18:52
1
Solved
I started a project using composer and donlowaded the package vlucas/phpdotenv. I would like to call the $_ENV['name'] for example in my whole project without needing to instantiate the dot env in ...
Brosy asked 16/7, 2021 at 11:52
3
Solved
I have included autoload.php in the header of my site
include 'vendor/autoload.php';
From this i am receiving the following errors on my site:
Warning: require_once(DIR/composer/autoload_rea...
Guib asked 23/8, 2013 at 15:3
1
I'm running a Rails 5.2.0 application. This LoadError always appears on the first request after a reboot or a recompile:
Unable to autoload constant Api::V1::ApplesController, expected /fruits_and_...
Siracusa asked 27/10, 2020 at 4:44
3
Solved
I have one package in a project which is autoloaded using composer and composer.json entry is as follows :
"autoload": {
"psr-4": {
"CompanyName\\PackageName\\": "packages/package-folder/src/"...
Subduct asked 19/9, 2016 at 10:52
4
Solved
I'm working on 2 applications right now. The first one is a CMS, and the second is a shop. I want to move my vendor one level above and the share it between projects.
So my structure will be somet...
Konopka asked 2/5, 2015 at 8:25
3
This is a tricky one to explain. I have a module in another module namespace like so:
# app/models/points/calculator.rb
module Points
module Calculator
def self.included(base)
base.send(:includ...
Almoner asked 3/7, 2014 at 5:29
1
I want to scale separately some subparts of my rails app and avoid loading the whole codebase.
For the sake of example, let's consider an APIv1 vs an APIv2, but I'd also want to extend this any cl...
Varicella asked 24/5, 2017 at 10:47
1
Solved
I use two self developed libraries located in github as a private repository so I can reuse it in several projects. I include them via composer:
"license": "proprietary",
"...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.