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

Socket is a reserved classname #3830

Closed
wants to merge 1 commit into from
Closed

Conversation

afilina
Copy link
Contributor

@afilina afilina commented Oct 4, 2024

The fact that this classname can no longer be used for custom classes (making legacy code crash) is not explicitly stated anywhere.

The fact that this classname can no longer be used for custom classes (making legacy code crash) is not explicitly stated anywhere.
@cmb69
Copy link
Member

cmb69 commented Oct 4, 2024

There is already a lengthy Resource to Object Migration section above. Maybe we should add a list of the respective class names. Possibly using <simplelist type="inline">. Something like this at the end of this section:

<para>
 This implies that the following class names can no longer be used for custom classes in the toplevel namespace:
 <simplelist type="inline">
  …, 
  classname>Socket</classname>,
  …
 </simplelist>.
</para>

@afilina
Copy link
Contributor Author

afilina commented Oct 4, 2024

I feel like the list above serves a different purpose: it matters to those who interact with these classes directly. When upgrading PHP versions, the code blows up in a completely different area, where I don't actually care about checking the returned value. The real problem is that the arrival of new classes in the global namespace starts interfering with existing classes in the application code, causing a fatal error (old code without namespaces).

Ideally, I would add a whole section or even page on classnames that became reserved, as that is most useful when upgrading legacy code.

@cmb69
Copy link
Member

cmb69 commented Oct 4, 2024

Well, actually all new classes and interfaces should be listed on an own page (like for migration81 and migration 83), regardless whether they stem from resource to object conversion, or are new features. Of course, such new classes and interfaces may cause backward incompatibilites, but it's the same with new functions and constants which are also listed on their dedicated pages (but not in the "Backward Incompatible Changes" section).

Would that be okay for you?

@afilina
Copy link
Contributor Author

afilina commented Oct 4, 2024

Yes, that would be perfect. I'm not sure how to create a new page in the docs. Perhaps if you could create one, I would be able to fill it with a whole bunch of class names.

@cmb69
Copy link
Member

cmb69 commented Oct 4, 2024

Please see and double-check #3832; maybe I've missed one or three.

@afilina afilina closed this Oct 7, 2024
@afilina afilina deleted the socket-classname branch October 7, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants