1 | <?php |
||||||
2 | |||||||
3 | namespace Smindel\GIS\ORM; |
||||||
4 | |||||||
5 | use SilverStripe\PostgreSQL\PostgreSQLSchemaManager; |
||||||
0 ignored issues
–
show
|
|||||||
6 | use SilverStripe\ORM\DB; |
||||||
7 | use SilverStripe\ORM\FieldType\DBField; |
||||||
8 | use SilverStripe\Control\Director; |
||||||
9 | use SilverStripe\Core\Config\Config; |
||||||
10 | use Smindel\GIS\GIS; |
||||||
11 | use Smindel\GIS\ORM\FieldType\DBGeometry; |
||||||
12 | use Exception; |
||||||
13 | |||||||
14 | /* |
||||||
15 | http://postgis.net/docs/PostGIS_Special_Functions_Index.html#PostGIS_3D_Functions |
||||||
16 | */ |
||||||
17 | |||||||
18 | if (!class_exists(PostgreSQLSchemaManager::class)) { |
||||||
19 | return; |
||||||
20 | } |
||||||
21 | |||||||
22 | class PostGISSchemaManager extends PostgreSQLSchemaManager |
||||||
23 | { |
||||||
24 | use GISSchemaManager; |
||||||
25 | |||||||
26 | public function schemaUpdate($callback) |
||||||
27 | { |
||||||
28 | // @todo: terrible hack to make the postgis extension manually installed in the "public" schema |
||||||
29 | // abailable in the unit test db |
||||||
30 | if (Director::is_cli() && !Director::isLive()) { |
||||||
31 | DB::get_conn()->setSchemaSearchPath(DB::get_conn()->currentSchema(), 'public'); |
||||||
0 ignored issues
–
show
The method
currentSchema() does not exist on SilverStripe\ORM\Connect\Database .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() The method
setSchemaSearchPath() does not exist on SilverStripe\ORM\Connect\Database .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||||
32 | } |
||||||
33 | parent::schemaUpdate($callback); |
||||||
34 | } |
||||||
35 | } |
||||||
36 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths