Skip to content
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

--match-fields doesn't support lowerCamelCase field names #19

Open
josefglatz opened this issue May 14, 2017 · 0 comments
Open

--match-fields doesn't support lowerCamelCase field names #19

josefglatz opened this issue May 14, 2017 · 0 comments
Assignees

Comments

@josefglatz
Copy link
Collaborator

josefglatz commented May 14, 2017

h2. Problem

When I try to import the table tx_scheduler_task_groups with
./typo3cms import:table "tx_scheduler_task_group" "groupName" "/app/Build/DefaultDatabaseRecords/tx_scheduler_task_group.yml" an error occurs: Some matchFields do not exist: groupame (It seems as if he swallows the big N) ;-)

h2. Suggested solution: adjust the first parameter for preg_replace (add A-Z) like in the following code snippet

<?php
	$matchFields = 'groupName,group_name,group-name,title,SomeFieldName';
	print_r(
		explode(',', preg_replace('/[^a-zA-Z0-9_,]/', '', $matchFields))
	);

which results in:

Array
(
    [0] => groupName
    [1] => group_name
    [2] => groupname
    [3] => title
    [4] => SomeFieldName
)


What do you think @Tuurlijk ? Did I overseen anything whether something is against it?

@josefglatz josefglatz self-assigned this Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant