From 6e8c376a3e3d86f469ae12fcd97c8eafbe5763f9 Mon Sep 17 00:00:00 2001 From: Alexandra Nantel Date: Tue, 23 May 2017 10:50:04 -0400 Subject: [PATCH 1/4] PHP7 Compatibility --- extension.meta.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extension.meta.xml b/extension.meta.xml index 9288018..14e3870 100644 --- a/extension.meta.xml +++ b/extension.meta.xml @@ -17,6 +17,9 @@ + + - PHP7 Compatibility + - Mark compatibility with Symphony 2.7 From df57a6ae2a27a427f6aa8e3cff462eaf3f62d569 Mon Sep 17 00:00:00 2001 From: Alexandra Nantel Date: Thu, 24 Aug 2017 15:34:10 -0400 Subject: [PATCH 2/4] SQL and PHP cases PHP true,false,null in lowercase SQL keywords uppercase --- lib/bitter/formats/symphony.php | 48 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/bitter/formats/symphony.php b/lib/bitter/formats/symphony.php index 6f74a2d..c09c778 100755 --- a/lib/bitter/formats/symphony.php +++ b/lib/bitter/formats/symphony.php @@ -1,23 +1,23 @@ output = $source; - + $this->processTabs(); $this->processLines(); - + return sprintf( '
%s
', $this->output ); } - + protected function processTabs() { // first split the output into manageable chunks $lines = explode(PHP_EOL, $this->output); @@ -25,7 +25,7 @@ protected function processTabs() { // fix lines one by one for ($x = 0; $x < $linesCount; $x++) { // while there are still tabs - while (strpos($lines[$x], "\t") !== FALSE) { + while (strpos($lines[$x], "\t") !== false) { // replace tabs for spaces $lines[$x] = preg_replace_callback('%^([^\t]*)([\t]+)%', array($this, 'processTabsLine'), $lines[$x]); } @@ -33,72 +33,72 @@ protected function processTabs() { // concat the final output $this->output = implode(PHP_EOL, $lines); } - + protected function processTabsLine($matches) { return $matches[1] . str_repeat( ' ', strlen($matches[2]) * $this->tabsize ); } - + protected function processLines() { $tokens = preg_split('%(|)%', $this->output, 0, PREG_SPLIT_DELIM_CAPTURE); $stack = array(); $this->output = ''; - + $this->startLine(); - + foreach ($tokens as $token) { // Close: if (preg_match('%^output .= $token; } - + // Open: else if (preg_match('%^<%', $token)) { array_push($stack, $token); $this->output .= $token; } - + else { $characters = preg_split('//', $token); - + foreach ($characters as $character) { if ($character == "\n") { $this->endLine(); - + foreach ($stack as $alt_token) $this->output .= ''; } - + $this->output .= $character; - + if ($character == "\n") { $this->startLine(); - + foreach ($stack as $alt_token) $this->output .= $alt_token; } } } } - + $this->endLine(); } - + protected function startLine() { $this->output .= "line}\">"; $this->output .= ""; $this->output .= ""; } - + protected function endLine() { $this->line++; $this->output .= ''; $this->output .= ''; } } - + /*----------------------------------------------------------------------------*/ - + return new BitterFormatSymphony(); - + /*----------------------------------------------------------------------------*/ -?> \ No newline at end of file +?> From b8416ed72b82e13975bed5da0fea8350d8f7d9ec Mon Sep 17 00:00:00 2001 From: Alexandra Nantel Date: Fri, 25 Aug 2017 11:25:09 -0400 Subject: [PATCH 3/4] Relase infos .. Again --- extension.meta.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension.meta.xml b/extension.meta.xml index 14e3870..e88eba9 100644 --- a/extension.meta.xml +++ b/extension.meta.xml @@ -17,7 +17,8 @@ - + + - Update for Symphony 4.x - PHP7 Compatibility From bb573cb0528f66538268a4052965105a78c4a37a Mon Sep 17 00:00:00 2001 From: Alexandra Nantel Date: Fri, 29 Jun 2018 14:31:31 -0400 Subject: [PATCH 4/4] Fix build signature --- content/content.debug.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/content.debug.php b/content/content.debug.php index 36d15b4..c0dbacc 100755 --- a/content/content.debug.php +++ b/content/content.debug.php @@ -39,7 +39,7 @@ public function __construct(){ } } - public function build() { + public function build(array $context = array()) { $this->_view = (strlen(trim($_GET['debug'])) == 0 ? 'xml' : $_GET['debug']); return parent::build();