Commit graph

83 commits

Author SHA1 Message Date
Daniel Siepmann def55cbdc9 Make compatible with mysql 8 strict modes 2021-09-08 13:23:23 +02:00
Daniel Siepmann dd0f08e157 Fix none working Extbase queries
The queries missed an call to matching() to actually apply the
constraint.
2021-09-08 11:03:21 +02:00
Daniel Siepmann 2932a620e4 Don't store empty info for opening hour
Do not store none existing info.
Just store nothing if something is missing.

Frontend model already checks for existence.
2021-09-06 13:47:12 +02:00
Daniel Siepmann 5179e82706 Improve skipping detection in TYPO3 converter
All records which are not saved or useable are now skipped.
Some records were converted but could not be stored, e.g. because no
localization was configured for that table.

This should bring small performance improvement and also align import
log with actually imported (converted) records.

Logging is added as well, only debug level, to allow developer and
integrator to analyse why some records are skipped.

Ignore some errors which don't actually exist.
We already check type of entity, and logger is always injected.
2021-09-06 13:47:12 +02:00
Daniel Siepmann 07f189a7f8 Support multiple price rules 2021-09-06 13:47:12 +02:00
Daniel Siepmann 592269baa8 Handle references ending in 404
Catch the exception and return null.
That is already a possible return type which should be handled by
callers.

Add test case with referenced 404 image.
2021-09-06 13:47:12 +02:00
Daniel Siepmann 73db8b5d9d Assume default timezone if not provided.
Data is coming from Germany and affects German places only.
We therefore expect German timezone.
2021-09-06 13:47:12 +02:00
Daniel Siepmann 265cb27236 Support multiple provided URLs
An object might have more then a single URL.
This is now added.
2021-09-06 13:47:12 +02:00
Daniel Siepmann 8315d42934 Add accessibility_specification 2021-09-06 13:47:12 +02:00
Daniel Siepmann cc216429a5 Add parking_facility_near_by
- Removed individual converters for TYPO3.
  Conversion is now handled in a single converter.
- The new converter will import necessary dependencies upfront, e.g.
  town or organisation.
- Move import state into extra class.

Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 5859c14525 Add distanceToPublicTransport property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 46fe3a2e81 Add availableLanguage property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 4c9b055e0c Add publicAccess property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann ffd894c102 Add isAccessibleForFree property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann bd717d1596 Add petsAllowed property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann ce6a34b543 Add photography property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 07cd56fef4 Add digitalOffer property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 4a1928ece6 Add paymentAccepted property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann c1167a7848 Add trafficInfrastructure property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 3ce8f13b04 Add architecturalStyle property to tourist information
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 92d33c0956 Add museumService property to tourist information
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann b41ba9b6d1 Add otherService propterty to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann b1ce004ddb Add sanitation property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 78796e1efa Add startOfConstruction property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 0f59085653 Add slogan property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann b8b0ff4761 Adapt ECS configuration
The used constant was made private and we adapt our code
2021-08-31 09:11:31 +02:00
Daniel Siepmann 8ef79d51cb Sort offer prices by title
ThüCAT doesn't provide the editorial order of prices.
Therefore our frontend now renders them based on title in alphabetical
order.
2021-08-23 16:35:13 +02:00
Daniel Siepmann 075a591256 Add strict_types to all files 2021-08-12 09:46:37 +02:00
Daniel Siepmann 7c8dd0df3b Cleanup refactoring after big refactoring 2021-08-12 09:46:37 +02:00
Daniel Siepmann bfd4c77a17 Refactor parsing of JSON-LD
Use Symfony components to map incoming JSON onto objects.
Those provide a mapping. They can then be used to fetch the data in a
common way and insert it into the system.

- Handle languages within JsonDecode
  (normalize incoming data based on language)
- Handle Single Value and List of Values within Entities. They will map
  incoming Data to proper Objects. (We now generally transform during
  serialization process if target is array but we got single entity)
- Add missing tests for existing data.
- Finish migration of all existing data, this includes next step
- Provide discriminator to ObjectNormalizer to auto detect target class
  based on "type" property. (Done for now by own registry)
- Combine generated object with current structure for import -> generate
  data array out of it.
- Resolve foreign references to existing entities,
  (images, contentresponsible, etc.)
2021-08-12 09:46:37 +02:00
Daniel Siepmann fb6b494993 Remove rdfs:label from tests
The endpoint no longer delivers that data which seemed to be a duplicate
of schema:name which we already used anyway.
2021-08-12 09:46:37 +02:00
Daniel Siepmann a980f3c2ad Update phpstan ignoreErrors
TYPO3 changed return type hint.
2021-08-12 09:30:48 +02:00
Daniel Siepmann 1a6940633e Add first frontend test
This should ensure rendering works as expected.
Most important: This ensures data is available in frontend templates.

Add dev dependency to fluid_styled_content. This is necessary to test
our rendering integration with fluid_styled_content defaults.

Relates: #34
2021-08-12 09:30:48 +02:00
Daniel Siepmann dc09713884 Move namespace below initial file comment 2021-08-10 09:41:54 +02:00
Daniel Siepmann a27eae4148 Add missing test for opening and media 2021-08-09 16:19:58 +02:00
Daniel Siepmann 5185c06015 Fix label of CI tasks 2021-08-09 09:03:24 +02:00
Daniel Siepmann db8963d92d Add functional tests for import of tourist information 2021-08-09 09:00:20 +02:00
Daniel Siepmann 2d9540436a Add functional tests for import of town 2021-08-09 09:00:20 +02:00
Daniel Siepmann 9c60e275d0 Handle 404 for assigned media 2021-06-08 14:05:24 +02:00
Daniel Siepmann baf32b3477 Add info regarding storagePid and language relation 2021-06-08 14:05:24 +02:00
Daniel Siepmann 80827049f9 Enable usage of DataHandler with mysql strict mode 2021-06-08 14:05:24 +02:00
Daniel Siepmann 6b19485a36 Handle resources with missing containedInPlace
Check for situation and return empty array.
Do not create unnecessary requests to database but directly return.
2021-06-08 14:05:24 +02:00
Daniel Siepmann eac551e2bc Add documentation
Add detailed documentation rendered at docs.typo3.org beside existing
readme.

Resolves: #20
2021-06-01 14:59:08 +02:00
Daniel Siepmann 9cfb0fdb3a Fix @covers and @uses annotations within tests
Always use `\` prefix as best practice.
Add missing new classes.
2021-06-01 11:27:23 +02:00
Daniel Siepmann e13bb35252 Handle removed configuration in log overview
Resolves: #13
2021-06-01 11:23:25 +02:00
Daniel Siepmann 1088a580a0 Allow editor to create and edit import configuration
Import Configuration can now be stored on folders, beside the site root.
That way editors can create and edit records.
The default storage pid for new records can be defined via TypoScript.

Resolves: #24
2021-06-01 09:53:58 +02:00
Daniel Siepmann 1b304945c0 Add hint regarding formatted descriptions 2021-06-01 09:50:50 +02:00
Daniel Siepmann 197a3e4696 Support sync scope
Add new configuration to support sync scope.
This one requires the provided sync scope id and will always update all
entries.

Relates: #23
2021-06-01 09:43:33 +02:00
Daniel Siepmann 22932545d3 Handle relation to single "containedInPlace"
Only multiple containedInPlace were supported.
Some instances only have a single containedInPlace. This is now handled
as well.
2021-05-10 09:41:25 +02:00
Daniel Siepmann bbf7ada1d2 Add tests for modified models
That's necessary as models grow.
Added features should be tested to not break with future changes.

The tests revealed an existing error in fallback which got fixed to make
new test pass.

Relates: #18
2021-04-14 11:33:37 +02:00