Skip to content

Commit

Permalink
Bug fixes in master into dev (#1137)
Browse files Browse the repository at this point in the history
* FIXED error for unsupported php 8.4 in xdebug (#1134)

* FIXED error for unsuported php 8.4 version by upgrading xdebug to version 3.4.0beta1

* temporarily fix by disabling php 8.4 deprecation warnings in apiv2

* Fixed preprocessor skip command bug. (#1126)

* Fixed preprocessor skip command bug.

* Added changelog entry.

* Updated changelog entry version.

* Use utf8mb4 as default encoding (#1127)

* Use utf8mb4.

* Added comment, added changelog entry.

---------

Co-authored-by: jessevz <[email protected]>

---------

Co-authored-by: gochujang-c <[email protected]>
  • Loading branch information
jessevz and gochujang-c authored Nov 28, 2024
1 parent fe16f39 commit c3cf92b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ENTRYPOINT [ "docker-entrypoint.sh" ]
FROM hashtopolis-server-base as hashtopolis-server-dev

# Setting up development requirements, install xdebug
RUN yes | pecl install xdebug && docker-php-ext-enable xdebug \
RUN yes | pecl install xdebug-3.4.0beta1 && docker-php-ext-enable xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.mode = debug" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.start_with_request = yes" >> /usr/local/etc/php/conf.d/xdebug.ini \
Expand Down
12 changes: 12 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# v0.14.3 -> v0.14.4


## Enhancements

- Use utf8mb4 as default encoding in order to support the full unicode range

## Bugfixes

- Fixed a bug where creating a new preprocessor would copy the configured limit command over the configured skip command


# v0.14.2 -> v0.14.3

## Tech Preview New API
Expand Down
2 changes: 1 addition & 1 deletion src/api/v2/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

date_default_timezone_set("UTC");
error_reporting(E_ALL);
error_reporting(E_ALL ^ E_DEPRECATED);
ini_set("display_errors", '1');
/**
* Treat warnings as error, very usefull during unit testing.
Expand Down
4 changes: 3 additions & 1 deletion src/dba/AbstractModelFactory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,9 @@ public function getDB($test = false) {
}
else {
global $CONN;
$dsn = 'mysql:dbname=' . $CONN['db'] . ";host=" . $CONN['server'] . ";port=" . $CONN['port'] . ";charset=utf8";
// The utf8mb4 is here to force php to connect with that encoding, so you can save emoji's or other non ascii chars (specifically, unicode characters outside of the BMP) into the database.
// If you are running into issues with this line, we could make this configurable.
$dsn = 'mysql:dbname=' . $CONN['db'] . ";host=" . $CONN['server'] . ";port=" . $CONN['port'] . ";charset=utf8mb4";
$user = $CONN['user'];
$password = $CONN['pass'];
}
Expand Down
2 changes: 1 addition & 1 deletion src/inc/utils/PreprocessorUtils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function addPreprocessor($name, $binaryName, $url, $keyspaceComman
$limitCommand = null;
}

$preprocessor = new Preprocessor(null, $name, $url, $binaryName, $keyspaceCommand, $limitCommand, $limitCommand);
$preprocessor = new Preprocessor(null, $name, $url, $binaryName, $keyspaceCommand, $skipCommand, $limitCommand);
Factory::getPreprocessorFactory()->save($preprocessor);
}

Expand Down

0 comments on commit c3cf92b

Please sign in to comment.