You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, I understand that MySQL 8.0 is still in development. I am working on a project that will most likely be done after this is out, so am using it in my development.
Initial testing and development work seems to show that things with this library seem to work fine with MySQL 8.0, except for the \CrEOF\Spatial\DBAL\Platform\MySql class.
Starting with MySQL 5.6, the "GeomFromText" and "AsBinary" functions were deprecated, and it is suggested that "ST_GeomFromText" and "ST_AsBinary" be used instead. With MySQL 8.0, these older functions have been removed and so their "ST_" counterparts must be used.
I assume that the library needs to keep MySQL 5.5 support. I think that MySQL 5.5 EOL was in 2015, but extended EOL goes until the end of 2018. If not, then we should be able to just use the "ST_" counterparts as they are available in 5.6 and above.
It's also possible to maybe detect that a later version of MySQL is being used and we can load a fine-tuned Platform class that has these methods fixed. In the \CrEOF\Spatial\DBAL\Types\AbstractSpatialType::getSpatialPlatform method, the DBAL platform datatype that is passed through does have a specific class for when a PHP 5.7+ database is used.
Some logic could be added to this method to detect this, and if so, load an extended MySQL platform from this library that has the necessary spatial functions. The only issue is that we'd have to check whether or not the passed in AbstractPlatform in that function is of a specific type as I don't think we can detect a specific MySQL version just from that. This may not be an ideal way to implement such a check.
If there is any kind of interest in this, I can submit a PR for review.
The text was updated successfully, but these errors were encountered:
I made the change in the vendor, which is a very bad idea. It is implied in the documentation that we can make the function change from our code, but I can't figure out how to do it.
Do you have an example to implement?
First, I understand that MySQL 8.0 is still in development. I am working on a project that will most likely be done after this is out, so am using it in my development.
Initial testing and development work seems to show that things with this library seem to work fine with MySQL 8.0, except for the \CrEOF\Spatial\DBAL\Platform\MySql class.
Starting with MySQL 5.6, the "GeomFromText" and "AsBinary" functions were deprecated, and it is suggested that "ST_GeomFromText" and "ST_AsBinary" be used instead. With MySQL 8.0, these older functions have been removed and so their "ST_" counterparts must be used.
I assume that the library needs to keep MySQL 5.5 support. I think that MySQL 5.5 EOL was in 2015, but extended EOL goes until the end of 2018. If not, then we should be able to just use the "ST_" counterparts as they are available in 5.6 and above.
It's also possible to maybe detect that a later version of MySQL is being used and we can load a fine-tuned Platform class that has these methods fixed. In the \CrEOF\Spatial\DBAL\Types\AbstractSpatialType::getSpatialPlatform method, the DBAL platform datatype that is passed through does have a specific class for when a PHP 5.7+ database is used.
Some logic could be added to this method to detect this, and if so, load an extended MySQL platform from this library that has the necessary spatial functions. The only issue is that we'd have to check whether or not the passed in AbstractPlatform in that function is of a specific type as I don't think we can detect a specific MySQL version just from that. This may not be an ideal way to implement such a check.
If there is any kind of interest in this, I can submit a PR for review.
The text was updated successfully, but these errors were encountered: