Download the PHP package tvelu77/php-serial without Composer
On this page you can find all versions of the php package tvelu77/php-serial. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tvelu77/php-serial
More information about tvelu77/php-serial
Files in tvelu77/php-serial
Package php-serial
Short Description Multi-platform convenience class to access the serial port from PHP for PHP 8+
License GPL-2.0-only
Informations about the package php-serial
PHP Serial
This project was created for a project at my work where a Symfony project needs to communicate to a machine through the COM port on Windows.
After a long time, surfing the web, I found PHP-Serial made by Xowap.
However, when I found out that the project wasn't longer maintened and the pull requests weren't accepted, I decided to share some fixes and improvements !
Especially, a Windows fix, a PHP 8+ compatibility and a cleaner code (I think so, I don't know, Java is better :P).
I really hope it will help someone !
Of course, I am not the main author, all credits goes to Xowap.
Example
State of the project
Bugs
There is lots of bugs. I know there is. I just don't know which are they.
Platform support
- Linux: need to be tested !
- MacOS: need to be tested !
- Windows: it should work, at least on a Windows server, it works :) !
Concerns
I have a few concerns regarding the behaviour of this code.
- Inter-platform consistency. I seriously doubt that all operations go the same way across all platforms.
- Auto-closing the device. There is an auto-close function that is registered at PHP shutdown. This sounds quite ridiculous, something has to be done about that.
- Use exceptions.
Call for contribution
As in all open-source projects, I need people to fit this to their needs and to contribute back their code.
If you feel like doing any of those, do not hesitate to create an issue or a pull-request, I'll gladly consider consider it :)