modmore / Gitify

Command line toolkit to make managing a MODX site in git a lot easier.
MIT License
122 stars 55 forks source link

FIX: build command removes some files and modx objects #421

Closed livingroot closed 1 year ago

livingroot commented 1 year ago

What does it do ?

replaced SplFileInfo::getBasename() calls with SplFileInfo::getFilename(), also second commit fixes conflict resolution

Why is it needed ?

  1. If yaml file name starts with non-english characters, gitify build removed those files.

Example:

$file = new SplFileInfo("directory/файл.txt"); // file, which contains cyrillic characters
var_dump($file->getBasename());
var_dump($file->getFilename());

output:

string(4) ".txt" // wrong
string(12) "файл.txt" // correct
  1. Fixes primary key conflict resolution (see comment below)