Skip to content

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

@josefglatz

Description

@josefglatz

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions