mirror of
https://github.com/Codappix/search_core.git
synced 2024-12-22 18:16:11 +01:00
BUGFIX: Resolve some mysql strict mode issues
* Adjust fixtures to be strict mode compatible. * Adjust documentation to cover requirements for development. * Notice that strict mode is not supported by TYPO3. * Document how to handle tests against multiple TYPO3 versions.
This commit is contained in:
parent
162d8ae9bd
commit
c68f853b63
6 changed files with 38 additions and 4 deletions
|
@ -14,16 +14,39 @@ Below is a documentation what to respect during contributions.
|
|||
Setup
|
||||
-----
|
||||
|
||||
To start contributions regarding code, make sure to setup your system::
|
||||
To start contributions regarding code, make sure your environment matches the following
|
||||
requirements:
|
||||
|
||||
* composer is executable
|
||||
|
||||
* PHP on CLI is executable
|
||||
|
||||
* MySQL is up and running with user *dev* and password *dev* on *127.0.0.1* or to overwrite the
|
||||
environment variables, see :file:`Makefile`.
|
||||
And MySQL is not set to strict mode as TYPO3 doesn't support strict mode, see
|
||||
https://review.typo3.org/#/c/26725/3/INSTALL.md.
|
||||
|
||||
* Elasticsearch is installed and up and running on *localhost:9200*.
|
||||
|
||||
Then setup your system::
|
||||
|
||||
git clone git@github.com:DanielSiepmann/search_core.git \
|
||||
&& cd search_core \
|
||||
&& export typo3DatabaseName="searchcoretest62" \
|
||||
&& export TYPO3_VERSION="~6.2" \
|
||||
&& make install \
|
||||
&& make functionalTests
|
||||
|
||||
If all tests are okay, start your work.
|
||||
|
||||
Of course you might need some requirements like running elasticsearch and composer to work before.
|
||||
If you are working with multiple TYPO3 versions make sure to export `typo3DatabaseName` and
|
||||
`TYPO3_VERSION` in your environment like::
|
||||
|
||||
export typo3DatabaseName="searchcoretest76"
|
||||
export TYPO3_VERSION="~7.6"
|
||||
|
||||
Also run the install command for each version before running any tests. Only this will make sure you
|
||||
are testing against the actual TYPO3 Version and database scheme.
|
||||
|
||||
.. _contribution_development:
|
||||
|
||||
|
@ -34,7 +57,7 @@ All changes are introduced through pull requests at `Github`_ and should contain
|
|||
|
||||
* Adjusted tests if tests existed before. Otherwise they will break on `travis-ci`_.
|
||||
|
||||
* New tests whenever possible and usefull.
|
||||
* New tests whenever possible and useful.
|
||||
|
||||
* Code has to follow `PSR-2`_.
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -4,7 +4,7 @@ current_dir := $(dir $(mkfile_path))
|
|||
TYPO3_WEB_DIR := $(current_dir).Build/Web
|
||||
# Allow different versions on travis
|
||||
TYPO3_VERSION ?= ~6.2.19
|
||||
typo3DatabaseName ?= "test"
|
||||
typo3DatabaseName ?= "searchcore_test"
|
||||
typo3DatabaseUsername ?= "dev"
|
||||
typo3DatabasePassword ?= "dev"
|
||||
typo3DatabaseHost ?= "127.0.0.1"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<records>2,3</records>
|
||||
<header>Record 1</header>
|
||||
<deleted>0</deleted>
|
||||
<filelink_sorting>0</filelink_sorting>
|
||||
</tt_content>
|
||||
<tt_content>
|
||||
<uid>2</uid>
|
||||
|
@ -14,6 +15,7 @@
|
|||
<CType>header</CType>
|
||||
<header>Record 2</header>
|
||||
<deleted>0</deleted>
|
||||
<filelink_sorting>0</filelink_sorting>
|
||||
</tt_content>
|
||||
<tt_content>
|
||||
<uid>3</uid>
|
||||
|
@ -21,5 +23,6 @@
|
|||
<CType>header</CType>
|
||||
<header>Record 3</header>
|
||||
<deleted>0</deleted>
|
||||
<filelink_sorting>0</filelink_sorting>
|
||||
</tt_content>
|
||||
</dataset>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<header>Record with relation to multiple sys category record</header>
|
||||
<deleted>0</deleted>
|
||||
<categories>3</categories>
|
||||
<filelink_sorting>0</filelink_sorting>
|
||||
</tt_content>
|
||||
|
||||
<sys_category>
|
||||
|
@ -18,6 +19,7 @@
|
|||
<description>Category for testing</description>
|
||||
<parent>0</parent>
|
||||
<items>1</items>
|
||||
<l10n_diffsource></l10n_diffsource>
|
||||
</sys_category>
|
||||
|
||||
<sys_category>
|
||||
|
@ -29,6 +31,7 @@
|
|||
<description>Another category for testing</description>
|
||||
<parent>1</parent>
|
||||
<items>1</items>
|
||||
<l10n_diffsource></l10n_diffsource>
|
||||
</sys_category>
|
||||
|
||||
<sys_category>
|
||||
|
@ -40,6 +43,7 @@
|
|||
<description></description>
|
||||
<parent>0</parent>
|
||||
<items>1</items>
|
||||
<l10n_diffsource></l10n_diffsource>
|
||||
</sys_category>
|
||||
|
||||
<sys_category_record_mm>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<pid>0</pid>
|
||||
<file>1</file>
|
||||
<title>Metadata title 1</title>
|
||||
<l10n_diffsource></l10n_diffsource>
|
||||
</sys_file_metadata>
|
||||
|
||||
<sys_file_metadata>
|
||||
|
@ -19,6 +20,7 @@
|
|||
<pid>0</pid>
|
||||
<file>1</file>
|
||||
<title>Metadata title 2</title>
|
||||
<l10n_diffsource></l10n_diffsource>
|
||||
</sys_file_metadata>
|
||||
|
||||
<sys_file_metadata>
|
||||
|
@ -26,5 +28,6 @@
|
|||
<pid>0</pid>
|
||||
<file>2</file>
|
||||
<title>Metadata title with no relation</title>
|
||||
<l10n_diffsource></l10n_diffsource>
|
||||
</sys_file_metadata>
|
||||
</dataset>
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
<CType>list</CType>
|
||||
<header_layout>1</header_layout>
|
||||
<deleted>0</deleted>
|
||||
<filelink_sorting>0</filelink_sorting>
|
||||
</tt_content>
|
||||
</dataset>
|
||||
|
|
Loading…
Reference in a new issue