Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfuller2 committed Jul 31, 2024
2 parents b37aeee + 4e66322 commit 7cd8ec0
Show file tree
Hide file tree
Showing 11 changed files with 1,167 additions and 387 deletions.
27 changes: 22 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Forces new Travis-CI Infrastructure
sudo: false

language: php

# Allows use container-based infrastructure
sudo: false

env:
global:
- RUN_UNIT_TESTS="yes"
Expand All @@ -16,14 +17,30 @@ matrix:
fast_finish: true
include:
- php: 8.1
- php: 8.2
- php: hhvm
env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no"

services:
allow_failures:
- php: hhvm

before_script:
#- phpenv config-rm xdebug.ini
# Make sure all dev dependencies are installed
- composer install
- composer self-update
- composer install --prefer-source --no-interaction --dev

# Start mysql service
#services:
# - mysql

## Cache composer and apt downloads.
cache:
apt: true
directories:
# Cache directory for older Composer versions.
- $HOME/.composer/cache/files
# Cache directory for more recent Composer versions.
- $HOME/.cache/composer/files

script:
# Run PHPCS.
Expand Down
11 changes: 11 additions & 0 deletions admin/sql/updates/mysql/10.0.0-20220921.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
CREATE TABLE IF NOT EXISTS `#__bsms_update`
(
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
version VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (id)
) DEFAULT CHARSET = utf8;

INSERT INTO `#__bsms_update` (id, version)
VALUES ('42', '10.0.0-20220921')
ON DUPLICATE KEY UPDATE version = '10.0.0-20220921';

alter table `#__bsms_podcast`
modify podcast_image_subscribe varchar(255) null;
alter table `#__bsms_podcast`
Expand Down
33 changes: 17 additions & 16 deletions admin/src/Helper/CwmdbHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// phpcs:enable PSR1.Files.SideEffects

use CWM\Component\Proclaim\Administrator\Model\CwmadminModel;
use Exception;
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Language\Text;
Expand Down Expand Up @@ -44,7 +45,7 @@ class CwmdbHelper
/**
* Install State
*
* @var boolean
* @var bool
*
* @since 1.5
*/
Expand All @@ -55,7 +56,7 @@ class CwmdbHelper
*
* @param string $cktable Table to check for exp:"#__bsms_admin
*
* @return boolean If table is there True else False if not.
* @return bool If table is there True else False if not.
*
* @since 7.0
*/
Expand All @@ -80,15 +81,15 @@ public static function checkIfTable($cktable): bool
* Alters a table
* command is only needed for MODIFY. Can be used to ADD, DROP, MODIFY, or CHANGE tables.
*
* @param array $tables Tables is an array of tables, fields, type of query and optional command line
* @param string $from Where the query is coming from for msg
* @param array $tables Tables is an array of tables, fields, type of query and optional command line
* @param string|null $from Where the query is coming from for msg
*
* @return boolean
* @return bool
*
* @throws \Exception
* @throws Exception
* @since 7.0
*/
public static function alterDB($tables, $from = null): bool
public static function alterDB(array $tables, string $from = null): bool
{
$db = Factory::getContainer()->get('DatabaseDriver');

Expand Down Expand Up @@ -193,7 +194,7 @@ public static function alterDB($tables, $from = null): bool
* @param string $table Is the table you are checking
* @param string $field Checking against.
*
* @return boolean false equals field does not exist
* @return bool false equals field does not exist
*
* @since 7.0
*/
Expand All @@ -219,9 +220,9 @@ public static function checkTables($table, $field): bool
* @param string|null $from Where the source of the query comes from
* @param int|null $limit Set the Limit of the query
*
* @return boolean true if success, or error string if failed
* @return bool true if success, or error string if failed
*
* @throws \Exception
* @throws Exception
* @since 7.0
*/
public static function performDB($query, string $from = null, int $limit = null): bool
Expand Down Expand Up @@ -255,7 +256,7 @@ public static function performDB($query, string $from = null, int $limit = null)
*
* @return boolean
*
* @throws \Exception
* @throws Exception
* @since 7.0
*/
public static function checkDB($table, $field): bool
Expand Down Expand Up @@ -333,7 +334,7 @@ public static function getInstallState(): bool
*
* @return bool
*
* @throws \Exception
* @throws Exception
* @since 7.1.0
*/
public static function fixupcss(string $filename, bool $parent, string $newcss, int $id = null)
Expand Down Expand Up @@ -424,7 +425,7 @@ public static function fixupcss(string $filename, bool $parent, string $newcss,
*
* @return bool
*
* @throws \Exception
* @throws Exception
*
* @since 7.0
*/
Expand All @@ -443,7 +444,7 @@ public static function reloadtable(object $result, string $table = 'Style')

// This is a Joomla bug for currentAssetId being missing in table.php. When fixed in Joomla should be removed
@$table->store();
} catch (\Exception $e) {
} catch (Exception $e) {
throw new \RuntimeException('Caught exception: ' . $e->getMessage(), 500);
}

Expand All @@ -457,7 +458,7 @@ public static function reloadtable(object $result, string $table = 'Style')
*
* @return bool|int
*
* @throws \Exception
* @throws Exception
* @since 7.0
*/
public static function resetdb($install = false): bool|int
Expand Down Expand Up @@ -533,7 +534,7 @@ public static function resetdb($install = false): bool|int
*
* @return void
*
* @throws \Exception
* @throws Exception
* @since 8.0.0
*
*/
Expand Down
2 changes: 1 addition & 1 deletion admin/src/Model/CwminstallModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ private function getSteps(): void
->order($this->_db->qn('id') . ' DESC');
$this->_db->setQuery($query, 0, 1);
$updates = $this->_db->loadObject();
$version = $updates->version;
$version = (string) $updates->version;
$this->versionSwitch = $version;

$this->callstack['subversiontype_version'] = $version;
Expand Down
Binary file removed build/com_proclaim-10.0.0-alpha.20240315.zip
Binary file not shown.
Loading

0 comments on commit 7cd8ec0

Please sign in to comment.