4 ms·
Depicts language feature, PHP ecosystem is dying. For me, an example is latest MediaWiki syntax highlight extension dropped GeSHi (PHP) which is not updated any
by Narann 6y ago
Depicts language feature, PHP ecosystem is dying. For me, an example is latest MediaWiki syntax highlight extension dropped GeSHi (PHP) which is not updated anymore, to pygments (Python) using a sub process.
I realized I have to drop MediaWiki because my host didn't expose PHP proc_open() feature.
I don't even know where to start. A natively written syntax highlighter can be considered as an important brick in an ecosystem (GeSHi was used everywhere few years ago), but it looks like no-one is working on it anymore so MediaWiki did an strong technological move to use Python via a sub process.
This kind of move (dropping a existing natively written tool for a tool from another language) shows how bad the ecosystem situation is.
- zozbot234 6y agoWould it be feasible to write a PHP equivalent to emscripten, so that one could export software compiled from any frontend language (including, e.g. the WASM representation) as a php object that can be run directly by mod_php?
- creshal 6y agoIt should be possible, but I'm not sure if PHP has the kind of community drive behind it to make it a realistic option. Or a necessary one – emscripten's main use case is "everyone has a browser", but there's very few PHP hosting offerings where you can't shell out and just run straight native code (in your own little isolated sandbox).
- zozbot234 6y ago> shell out and just run straight native code (in your own little isolated sandbox) Parent poster said that they couldn't do that on their host, though. Which breaks a MediaWiki feature (syntax highlighting for code blocks).
- dastx 6y agoThis is a side effect of open source. GeSHi, and many others, suddenly stop getting maintained, and more often than not, project ownership doesn't get passed down. This problem isn't unique to PHP. I have seen this is many projects across all kinds of different languages and tooling. Unfortunately, if there's no good alternative written in PHP, MediaWiki could have either reimplement it from scratch. In my opinion, GeSHi isn't the best implementation of a syntax highlighter, so I get their reason to not adopt it. Writing a syntax highlighter from scratch isn't a trivial task either. None of this says that the PHP ecosystem is dying though. MediaWiki isn't going to suddenly move away from PHP. Nor will many, many of the other big name projects that are still built on top PHP, and as long as there are big name projects, PHP ecosystem will continue to evolve. I will say choosing a Python sub-process at the sacrifice of portability (considering how many people simply run this on a PHP webhoster) is quite surprising.
- fnord123 6y agoThat's not a side effect of open source: it's a side effect of any dependency. If you were using foxpro, any google service, apis from companies bought by Apple, etc then the dependencies stop being maintained or vanish altogether.