-
Notifications
You must be signed in to change notification settings - Fork 196
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
Fatal error: Uncaught Error: Attempt to assign property "id" on null in phar:///usr/local/bin/terminus/src/Collections/TerminusCollection.php:95 #2254
Comments
I have strong reservations about the proposed fix. I think we need to know why the model data is null before we decide on a solution. Are there simply spurious I have never observed this failure mode, though, so I am unsure what to suggest. |
Thanks for the quick response @greg-1-anderson . I can look around more, but I noticed the last 2 data items in the array are NULL:
I can dig around more to see maybe why the are not getting set properly or passed in correctly on instantiation of this class. |
When it is SavedTokens->getData(), the 2 keys the end up with NULL data are commands and tokens. They are the only single named keys for some reason. Which appear to be directories. Any insight on that @greg-1-anderson ? |
Those extra keys are simply missing under PHP 7.4? |
Hey @greg-1-anderson so I was incorrect saying that under 7.4 and the 3.x version that it worked ok. The same issue persists and I believe I found out whats going on: In the 2.x version of terminus, in the FileStore class get method, terminus is only using the While in the 3.x version of terminus FileStore class get method there is also a So, my solution would be to either:
Thoughts? |
I can easily reproduce this issue in a github action.
I was not able to reproduce this issue in ddev using php 8. But ddev has terminus 2 installed by default and I have to overwrite with terminus 3. I think that is the difference. Github action fails on |
Actually, while the final error message is the same, my stack trace is a little different:
|
As a temporary work around (it didn't work) I tried doing |
I can't reproduce this locally. Does anyone know specifically what folders to create where to see this? I don't like the existing fixes, which mask symptoms rather than fixing the problem. If the actual problem is coming out of e.g. SavedTokens::getData(), then any filtering / skipping should happen there. |
One of the folders that get created on our lando setups is created in the bin here it looks like: https://github.com/pantheon-systems/terminus/blob/3.x/bin/terminus#L65 |
Yes, but I have that directory in my |
Not sure then, I can reproduce it with every D9 / php8 site I tried on Pantheon. We had to do a work around so we could ship out the php 8 containers for now on our pantheon recipe. |
#2268 I switch from |
Yeah, I commented on that PR just now. I'd feel more comfortable if we knew how to reproduce the problem before selecting a fix. |
We have been building for source this whole time as you can see here: https://github.com/lando/pantheon/blob/main/recipes/pantheon/8.0-fpm/Dockerfile#L25 So #2231 has been merged in for a couple months now. |
I will keep digging in the near future as I don't think the issues @heddn was having is the same as we are having. |
I stand corrected @greg-1-anderson. I updated our docker containers to use the 3.0.1 phar and it works now. So I was wrong and all is well now. Thank you @heddn as well. |
Apologies for commenting on a closed ticket. I just wanted to say that I am seeing the error:
When running the Which appears to coincide with the status page detecting "Our monitoring has detected elevated error rates for the Dashboard and Terminus commands. These may manifest as slow page loads, failed logins, or failures with Terminus commands." A colleague of mine is reporting the same error with the same command. I am using: Terminus 3.0.7 |
Expected behavior
I am building out php8 support for lando / terminus and our pantheon recipe. I am using the 3.x beta1 version. I am trying to run any terminus command and have it work.
Actual behavior
Whenever I run any command (I ssh'd into lando appserver itself), I get this fun error:
I have redone our Docker images for Lando, to build it from source as seen here: lando/pantheon#6, and I can tweak the code in Terminus on the TerminusCollection fetch method to:
And will work well. Curious as to why we have a model data of NULL in php 8.0 only. I have tried this same setup with php 7.4 and it works just fine. This doesn't appear to be a lando specific issue.
Should I put in a PR to make this adjustment or is something else going on here?
Steps to reproduce the behavior
Use any drupal 9 recipe with php 8.0 and lando. Override your .lando.yml to use the edge php 8.0 image,
The text was updated successfully, but these errors were encountered: