Skip to content

Instantly share code, notes, and snippets.

@AllenJB
Last active December 7, 2023 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AllenJB/217fc60cfb731033ae34be8c64b3c9f8 to your computer and use it in GitHub Desktop.
Save AllenJB/217fc60cfb731033ae34be8c64b3c9f8 to your computer and use it in GitHub Desktop.
PHP Wishlist

Types / Type Safety / Null-safe operations

PDO / Database

  • PDO: Error when requesting unsupported cursor type
  • PDO / MySQL support for MySQL warning (count)
    • Ability for PDO to issue PHP warnings when a query generates MySQL warnings
  • PDOStatement implements Countable

Date/Time related

  • DateTime(Immutable) factory methods throw Exceptions (preferably by default, if not an option similar to json_*)
  • strtotime() and similar
    • Deprecate or at least some big "you probably don't want to use this" warnings
    • Alternatively: Complete documented list of supported formats / rules (because people still expect this to parse anything they throw at it)
  • DateTime(Immutable): Deprecate strtotime-like functionality in constructor and make an explicitly ::guess() factory method

Async

Other

(New) User Experience

  • Related: https://externals.io/message/107096#107101
  • Link directly to the tutorial from the front page of php.net
  • Look at removing the https://www.php.net/docs.php page and replacing it by linking directly to the manual.
    • PHP 4 documentation, "More documentation" and downloads could be linked as an / from an appendix.
    • There's already a language switch on the top right of the page for switching to other languages
  • Move contributors to an appendix - it unnecessarily takes up a significant amount of space at the top of the manual index forcing users to scroll down to the content they want. We're all very grateful to the manual contributors, but it's not what 99% of users are there for.
  • Link directly to Language Reference and Features from the tutorial
  • talks.php.net:
    • Update links to use HTTPS (minor, but the "Not secure" is still ugly)
    • Link from the front page of php.net
    • Make it clear and easy for users to submit new talks and otherwise contribute to this section
    • Improved theme that doesn't make me want to scratch my eyes out. Avoid unnecessary animations (the elephpant is cute but it keeps pulling my brain from the actual content). (I might look into submitting some simple changes if/when I can find the repo for this)
    • Review and tidy up older talks
      • Remove anything that's completely out-of-date / doesn't work in PHP 7.x
      • Where multiple talks cover the same topic / material, pick the best / more up todate ones (for example there's like 3 dozen XDebug talks)
    • Some talks are broken - for example http://talks.php.net/show/vxml_php_2004 gives an error when trying to go to the next slide (bug filed: https://bugs.php.net/bug.php?id=78542 )
  • Consider a user-editable wiki
    • Talks would go well here, I think
    • See examples where other OSS projects do this - Python, Arch & Gentoo Linux
  • Review tutorial to ensure it provides concise, easy and quick information on how to achieve what new users are most likely to want to do and remove or move extraneous / out-of-date information

User-editable Wiki

A wiki might not be necessary if/when users can submit changes to the above mentioned content via GitHub assuming it's in an easy-to-edit format, which I know is being worked on. I understand the challenges of moderating wiki's (I was an moderator on the unofficial Gentoo Wiki for a time) and a PR based system does have the advantage of completely preventing spam / bad faith edits making it to the live documentation/site.

A wiki would however provide a place where unofficial links can be made. For example I feel it kind of weird that Composer / Packagist gets no mention on php.net. I understand it's a separate project and php.net doesn't want to prevent or dissuade competition, but it is also the defacto package manager for PHP and an easy way to find libraries for getting things done.

Inspiration

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