From 38e939c84801fa47db09b547c06083d4f97dff97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Goetz?= Date: Tue, 19 Apr 2016 18:13:37 +0200 Subject: [PATCH] Fix deepclone, generation and file loading bugs --- daux.phar | Bin 935035 -> 940108 bytes generate | 4 +-- libs/Compiler.php | 11 ++++---- .../ContentTypes/Markdown/TOC/Processor.php | 25 +++++++++++++----- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/daux.phar b/daux.phar index d8992f78921adcb3e146c9b7029429ece4c60daa..457b9f7b3286736e0f75ceeb74d74f2868b3b060 100755 GIT binary patch delta 16102 zcma(&2Ut|c){C?S?pzj@UKa%c1q6&;DGGvs6boXZtgr&omS&G7G5?E+vE9VcL?fDF zOroNBmK39D_JT(y2Y{4$~vBnBdo*NSZ&SmUbl{A^Y5(t zveCt6FdH*%64|)QCY_BJY(}uLr)?4&t87!)xW{%h8}03SvN76@>s4sS^?J^37=xd% z8^lHjdp;)HbA1=s4`J|q_FRwO?73dOlmi)Dr{s7WlwAKGl=%#v=rEp*YaOPr@wUSR zHjZ&DVB70`bTkv#HC=z!+KfiM! zK;R3NJ_<#}o*R2$!B3hXcrmth0^i0qfs0j=EC!!MxH;Y=qrFF}6bf0SJf_`wKXA7d z$cE1Vsa3D)c`i|G-0H&del*P0uF(uW(v>^0(X|(wZ*t{)TU-;E zt+oaz6wls&*H_Z^2#{JloTOy6Cqpb$r?K&E^;kA`bIW7|-`gk@+wQDADb@B?OEqqM zcbnZf@*i$_3^~i46TRj>j?M48k7dM3V6&v2>;0u|?tP_Y9^3(2Jh;jJ_TWTgJ$YQb zZ?zWQKfM ztx&l1xfdzrcn3%cK}0$l=* za6=r^a07Y=adoB#arJfvaRb~jj0xR2{ORu8P^Y`|0_4_%7m~alqnHBupuiuWetASX z?H?d%x;sc;_HbugxYlDNLs$iAGWD!$vOz;ZYVNL-bisU|bAyu@Qafbp<)@u)7>vQg zQwZTIjSU&jIIaodHRIb5u8M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zy(3c2fYseS-4TCCgf?}CebJrZMo}x+Etj>e5IH%!+X?}fvyyPAlC!#SbPUV{i3ns2 zGe4?|fNXjfya2Z7mlkF!wQdbSU?!-k3kp6^53aGar-s%r_wh0{l9ej7A`%37(C?85 z{hSmLN#CEtM|@ZtHJIw!s6Nz`f<_|~ZBB*tNl`FY&K5S$&PSoNxz385e5Xkq?x>R6rbF_}ZR1rXd0_I|-klGzcd3@)56Jy{!u$|F5r?)d=pPq)B z>r6YyN(?Sa!@06KAIZRMaV)SZXA9Gj_VjcZ^iXfz#-2rgeA$*?#X-F!1jIwVoGr*e zIAz|j3}C}CvrxALc!`;rmL1#ys9oukTpZ-tQ7vcc*&MtlZN}x>ZaZ6h3`i>o7n~bwF2t#w}8D7gKb^Z_H?#4zS#Yf)g+3~1BRw2s~zZK z0kb$#eLmd(XRaddFile($phar, new \SplFileInfo(__DIR__ . '/../vendor/composer/autoload_files.php')); $this->addFile($phar, new \SplFileInfo(__DIR__ . '/../vendor/composer/autoload_namespaces.php')); $this->addFile($phar, new \SplFileInfo(__DIR__ . '/../vendor/composer/autoload_real.php')); - $staticAutoload = new \SplFileInfo(__DIR__ . '/../vendor/composer/autoload_static.php'); - if ($staticAutoload->isFile()) { - $this->addFile($phar, $staticAutoload); - } - $this->addFile($phar, new \SplFileInfo(__DIR__ . '/../vendor/composer/ClassLoader.php')); + if (file_exists(__DIR__ . '/../vendor/composer/autoload_static.php')) { + $content = file_get_contents(__DIR__ . '/../vendor/composer/autoload_static.php'); + $content = str_replace('__DIR__ . \'/../..\' . \'/daux\'', 'PHAR_DIR . \'/daux\'', $content); + $phar->addFromString('vendor/composer/autoload_static.php', $content); + } + $content = file_get_contents(__DIR__ . '/../vendor/composer/autoload_psr4.php'); $content = str_replace('$baseDir . \'/daux\'', 'PHAR_DIR . \'/daux\'', $content); $phar->addFromString('vendor/composer/autoload_psr4.php', $content); diff --git a/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php b/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php index 9618094..bfe6a75 100644 --- a/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php +++ b/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php @@ -184,21 +184,34 @@ class Processor implements DocumentProcessorInterface return $list; } + protected function setNull($object, $property) { + $prop = new \ReflectionProperty(get_class($object), $property); + $prop->setAccessible(true); + $prop->setValue($object, null); + } + /** * @param Heading $node * @return Node[] */ protected function cloneChildren(Heading $node) { - $deepCopy = new DeepCopy(); - $firstClone = clone $node; - // We have no choice but to hack into the system to reset the parent, to avoid cloning the complete tree - $method = new ReflectionMethod(get_class($firstClone), 'setParent'); - $method->setAccessible(true); - $method->invoke($firstClone, null); + // We have no choice but to hack into the + // system to reset the parent, previous and next + $this->setNull($firstClone, 'parent'); + $this->setNull($firstClone, 'previous'); + $this->setNull($firstClone, 'next'); + // Also, the child elements need to know the next parents + foreach ($firstClone->children() as $subnode) { + $method = new ReflectionMethod(get_class($subnode), 'setParent'); + $method->setAccessible(true); + $method->invoke($subnode, $firstClone); + } + + $deepCopy = new DeepCopy(); return $deepCopy->copy($firstClone)->children(); } }