From eb0fd34eecdf7682de34a5c6ee99d1b6e58785c5 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Thu, 5 Mar 2020 01:43:37 +0000 Subject: [PATCH] Remove EntityLog and revert doctrine.yaml for one entity manager. #330 --- config/packages/doctrine.yaml | 269 ++++++++++++++----------------- src/Entity/Logging/EntityLog.php | 107 ------------ 2 files changed, 121 insertions(+), 255 deletions(-) delete mode 100644 src/Entity/Logging/EntityLog.php diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml index b425f88f..b1b6d947 100644 --- a/config/packages/doctrine.yaml +++ b/config/packages/doctrine.yaml @@ -4,163 +4,136 @@ parameters: # environment variables are not available yet. # You should not need to change this value. env(DATABASE_URL): '' - env(LOGGING_DATABASE_URL): '' doctrine: dbal: - default_connection: default - connections: - default: - # configure these for your database server - driver: 'pdo_mysql' - server_version: '5.7' - charset: utf8mb4 + # configure these for your database server + driver: 'pdo_mysql' + server_version: '5.7' + charset: utf8mb4 - # With Symfony 3.3, remove the `resolve:` prefix - url: '%env(resolve:DATABASE_URL)%' - logging: - # configure these for your database server - url: '%env(resolve:LOGGING_DATABASE_URL)%' - driver: 'pdo_mysql' - server_version: '5.7' - charset: utf8mb4 + # With Symfony 3.3, remove the `resolve:` prefix + url: '%env(resolve:DATABASE_URL)%' types: geometry: CrEOF\Spatial\DBAL\Types\GeometryType point: CrEOF\Spatial\DBAL\Types\Geometry\PointType polygon: CrEOF\Spatial\DBAL\Types\Geometry\PolygonType linestring: CrEOF\Spatial\DBAL\Types\Geometry\LineStringType - multipolygon: CrEOF\Spatial\DBAL\Types\Geometry\MultiPolygonType - - orm: - default_entity_manager: default auto_generate_proxy_classes: '%kernel.debug%' - entity_managers: - logging: - connection: logging - naming_strategy: doctrine.orm.naming_strategy.underscore - mappings: - Log: - is_bundle: false - type: annotation - dir: '%kernel.project_dir%/src/Entity/Logging' - prefix: 'App\Entity\Logging' - alias: Log - default: - connection: default - naming_strategy: doctrine.orm.naming_strategy.underscore - auto_mapping: true - mappings: - App: - is_bundle: false - type: annotation - dir: '%kernel.project_dir%/src/Entity' - prefix: 'App\Entity' - alias: App - dql: - string_functions: - # for postgresql - geometry: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\Geometry - stbuffer: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STBuffer - stcollect: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCollect - stsnaptogrid: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STSnapToGrid - stoverlaps: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STOverlaps - # for match against - match_against: App\Doctrine\MatchAgainst - numeric_functions: - # for postgresql - starea: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STArea - stasbinary: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STAsBinary - stasgeojson: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STAsGeoJson - stastext: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STAsText - stazimuth: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STAzimuth - stboundary: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STBoundary - stcentroid: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCentroid - stclosestpoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STClosestPoint - stcontains: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STContains - stcontainsproperly: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STContainsProperly - stcoveredby: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCoveredBy - stcovers: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCovers - stcrosses: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCrosses - stdisjoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STDisjoint - stdistance: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STDistance - stdistancesphere: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STDistanceSphere - stdwithin: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STDWithin - stenvelope: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STEnvelope - stexpand: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STExpand - stextent: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STExtent - stgeomfromtext: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STGeomFromText - stintersection: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STIntersection - stintersects: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STIntersects - stlength: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STLength - stlinecrossingdirection: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STLineCrossingDirection - stlineinterpolatepoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STLineInterpolatePoint - stmakebox2d: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STMakeBox2D - stmakeline: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STMakeLine - stmakepoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STMakePoint - stperimeter: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STPerimeter - stpoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STPoint - stscale: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STScale - stsetsrid: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STSetSRID - stsimplify: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STSimplify - ststartpoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STStartPoint - stsummary: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STSummary - sttouches: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STTouches - sttransform: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STTransform + naming_strategy: doctrine.orm.naming_strategy.underscore + auto_mapping: true + mappings: + App: + is_bundle: false + type: annotation + dir: '%kernel.project_dir%/src/Entity' + prefix: 'App\Entity' + alias: App + dql: + string_functions: + # for postgresql + geometry: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\Geometry + stbuffer: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STBuffer + stcollect: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCollect + stsnaptogrid: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STSnapToGrid + stoverlaps: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STOverlaps + # for match against + match_against: App\Doctrine\MatchAgainst + numeric_functions: + # for postgresql + starea: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STArea + stasbinary: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STAsBinary + stasgeojson: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STAsGeoJson + stastext: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STAsText + stazimuth: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STAzimuth + stboundary: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STBoundary + stcentroid: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCentroid + stclosestpoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STClosestPoint + stcontains: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STContains + stcontainsproperly: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STContainsProperly + stcoveredby: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCoveredBy + stcovers: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCovers + stcrosses: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STCrosses + stdisjoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STDisjoint + stdistance: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STDistance + stdistancesphere: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STDistanceSphere + stdwithin: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STDWithin + stenvelope: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STEnvelope + stexpand: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STExpand + stextent: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STExtent + stgeomfromtext: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STGeomFromText + stintersection: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STIntersection + stintersects: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STIntersects + stlength: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STLength + stlinecrossingdirection: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STLineCrossingDirection + stlineinterpolatepoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STLineInterpolatePoint + stmakebox2d: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STMakeBox2D + stmakeline: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STMakeLine + stmakepoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STMakePoint + stperimeter: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STPerimeter + stpoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STPoint + stscale: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STScale + stsetsrid: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STSetSRID + stsimplify: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STSimplify + ststartpoint: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STStartPoint + stsummary: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STSummary + sttouches: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STTouches + sttransform: CrEOF\Spatial\ORM\Query\AST\Functions\PostgreSql\STTransform - # for mysql - area: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Area - asbinary: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\AsBinary - astext: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\AsText - buffer: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Buffer - centroid: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Centroid - contains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Contains - crosses: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Crosses - dimension: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Dimension - distance: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Distance - disjoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Disjoint - distancefrommultyLine: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\DistanceFromMultyLine - endpoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\EndPoint - envelope: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Envelope - equals: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Equals - exteriorring: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\ExteriorRing - geodistpt: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GeodistPt - geometrytype: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GeometryType - geomfromtext: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GeomFromText - glength: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GLength - interiorringn: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\InteriorRingN - intersects: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Intersects - isclosed: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\IsClosed - isempty: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\IsEmpty - issimple: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\IsSimple - linestringfromwkb: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\LineStringFromWKB - linestring: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\LineString - mbrcontains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRContains - mbrdisjoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRDisjoint - mbrequal: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBREqual - mbrintersects: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRIntersects - mbroverlaps: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBROverlaps - mbrtouches: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRTouches - mbrwithin: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRWithin - numinteriorrings: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\NumInteriorRings - numpoints: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\NumPoints - overlaps: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Overlaps - pointfromwkb: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\PointFromWKB - pointn: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\PointN - point: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Point - srid: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\SRID - startpoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\StartPoint - st_buffer: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STBuffer - st_contains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STContains - st_crosses: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STCrosses - st_disjoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STDisjoint - st_distance: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STDistance - st_equals: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STEquals - st_intersects: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STIntersects - st_overlaps: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STOverlaps - st_touches: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STTouches - st_within: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STWithin - touches: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Touches - within: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Within - x: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\X - y: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Y + # for mysql + area: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Area + asbinary: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\AsBinary + astext: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\AsText + buffer: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Buffer + centroid: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Centroid + contains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Contains + crosses: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Crosses + dimension: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Dimension + distance: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Distance + disjoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Disjoint + distancefrommultyLine: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\DistanceFromMultyLine + endpoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\EndPoint + envelope: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Envelope + equals: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Equals + exteriorring: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\ExteriorRing + geodistpt: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GeodistPt + geometrytype: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GeometryType + geomfromtext: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GeomFromText + glength: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GLength + interiorringn: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\InteriorRingN + intersects: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Intersects + isclosed: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\IsClosed + isempty: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\IsEmpty + issimple: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\IsSimple + linestringfromwkb: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\LineStringFromWKB + linestring: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\LineString + mbrcontains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRContains + mbrdisjoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRDisjoint + mbrequal: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBREqual + mbrintersects: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRIntersects + mbroverlaps: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBROverlaps + mbrtouches: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRTouches + mbrwithin: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\MBRWithin + numinteriorrings: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\NumInteriorRings + numpoints: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\NumPoints + overlaps: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Overlaps + pointfromwkb: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\PointFromWKB + pointn: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\PointN + point: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Point + srid: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\SRID + startpoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\StartPoint + st_buffer: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STBuffer + st_contains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STContains + st_crosses: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STCrosses + st_disjoint: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STDisjoint + st_distance: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STDistance + st_equals: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STEquals + st_intersects: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STIntersects + st_overlaps: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STOverlaps + st_touches: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STTouches + st_within: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STWithin + touches: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Touches + within: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Within + x: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\X + y: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Y diff --git a/src/Entity/Logging/EntityLog.php b/src/Entity/Logging/EntityLog.php deleted file mode 100644 index 041addfb..00000000 --- a/src/Entity/Logging/EntityLog.php +++ /dev/null @@ -1,107 +0,0 @@ -changes = []; - } - - public function getID() - { - return $this->id; - } - - public function getUser() - { - return $this->user; - } - - public function setUser(string $user) - { - $this->user = $user; - return $this; - } - - public function getDateAction() - { - return $this->date_action; - } - - public function setDateAction(DateTime $date_action) - { - $this->date_action = $date_action; - return $this; - } - - public function getAction() - { - return $this->action; - } - - public function setAction(string $action) - { - $this->action = $action; - return $this; - } - - public function getChanges($id) - { - // return null if we don't have it - if (!isset($this->changes[$id])) - return null; - - return $this->changes[$id]; - } - - public function addChange($id, $value) - { - $this->changes[$id] = $value; - return $this; - } -}