-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Added tests for Doctrine Types #6
Conversation
Type::addType('multipoint', 'Brick\Geo\Doctrine\Types\MultiPointType'); | ||
Type::addType('multipolygon', 'Brick\Geo\Doctrine\Types\MultiPolygonType'); | ||
Type::addType('point', 'Brick\Geo\Doctrine\Types\PointType'); | ||
Type::addType('polygon', 'Brick\Geo\Doctrine\Types\PolygonType'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please use PHP 5.5's ::class
syntax here: use Brick\Geo\Doctrine\Types;
at the top of the file, then addType('...', Types\GeometryType::class);
.
Thanks for the PR!
If I understand correctly from your code, PostGIS has a single |
There is a |
I'm not sure we should venture into the territory of |
Thats's OK for me. |
- if [[ $ENGINE = GEOS ]]; then bash .travis.install-geos.sh; fi; | ||
- if [[ $ENGINE = SQLite3 ]]; then bash .travis.install-sqlite3.sh; fi; | ||
- composer install | ||
- composer install --prefer-source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use preferred-install in composer.json instead? So that no-one is confused by missing classes when cloning the repo and running a bare composer install
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to specify process-timeout
as well: on my machine, cloning Doctrine repos exceeded the default 300 seconds timeout, so Composer reverted to dist
install. Setting process-timeout
to 600 worked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we set the prefer source within the composer.json the packages will always be iinstalled from source. Put this is only required if you want to run the tests. In productive usage it is better to have them loaded from archive. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc says that these settings only apply to projects, so it should only apply when you run composer install from within the brick\geo repository (that is, when you're developing the library) not when it's included as a dependency of a third-party project!
Looks good. Thanks! |
Added tests for Doctrine Types
This adds integration tests for the doctrine types. I had to adjust some code, so everything works with PostgreSQL. The tests uses the DbalFunctionalTestCase as base, which is not part of the doctrine archive. Thats why I changed the composer install to prefer sources.