Skip to content
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

inspect error: autoloading breaking #121

Open
sunnysideup opened this issue Jun 28, 2018 · 6 comments
Open

inspect error: autoloading breaking #121

sunnysideup opened this issue Jun 28, 2018 · 6 comments

Comments

@sunnysideup
Copy link

I am trying to upgrade a module, but I am getting an error in inspect

image

@sunnysideup
Copy link
Author

Previously this command ran fine ...

@sunnysideup
Copy link
Author

When I temporary manually add them, it runs fine:

image

@maxime-rainville
Copy link
Contributor

That's a tricky one. I presume your module is referencing Page or PageController from the global namespace?

Is the module you are trying to upgrade installed in some other project with a Page and a PageController class? Or are you trying to upgrade it separately.

We could try checking if Page/PageController exist before we inspect and dynamically require our own dummy Page/PageController if they aren't, but that is kind of dodgy.

@sunnysideup
Copy link
Author

Thank you for looking at this.

I am trying to upgrade the module by itself, but with a dummy mysite/app folder that contains a PageController and a Page (basically a vanilla SS4 install). Why are the Page and PageConttroller not autoloaded but all the other classes are (AFAIK)?

@maxime-rainville
Copy link
Contributor

Maybe try moving your Page/PageController files to the same folder containing your module's code. Or try updating your autoload attribute in your comnposer.json file to explicitly reference Page/PageController

@sunnysideup
Copy link
Author

I have fixed it by running a dev/build first and then running it again (or something like this). This seems to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants