Skip to content

Commit 41123dc

Browse files
committed
updating INTERNAL_TABLE_CONSTRAINTS check
1 parent aaea6ca commit 41123dc

15 files changed

+39
-45
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ config/buildDatabase.php
2020
/junit.xml
2121
/PhpMetrics
2222
/out/*
23+
/out
24+
/tmp
25+
/wp-admin
26+
/wp-content
27+
/wp-includes
28+
/logs
29+
/temp
2330

2431
# recursive documentation (keep both)
2532
/view/assets/react/src/assets/src/*

.phpunit.result.cache

+1-1
Large diffs are not rendered by default.

composer.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@
7979
"php ./vendor/bin/phpmetrics --config=php-metrics.json ."
8080
],
8181
"post-install-cmd": [
82+
"mkdir -p \"`pwd`/wp-content/themes/c6documentation\"",
83+
"echo \"<?php use CarbonPHP\\CarbonPHP; CarbonPHP::run();\" >> \"`pwd`/wp-content/themes/c6documentation/index.php\"",
84+
"touch \"`pwd`/wp-content/themes/c6documentation/style.css\"",
8285
"@database:refresh:schema",
8386
"@rest",
8487
"@test"
@@ -105,8 +108,8 @@
105108
"cd view/assets/react && npm install && npm run build"
106109
],
107110
"start": [
108-
"open http://dev.carbonphp.com:8080/",
109-
"php -S dev.carbonphp.com:8080 index.php -d display_errors=1"
111+
"open http://local.carbonphp.com:8080/",
112+
"php -S local.carbonphp.com:8080 index.php -d display_errors=1"
110113
],
111114
"socket": "php index.php websocket",
112115
"test": [

config/Documentation.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ public function defaultRoute(): void // Sockets will not execute this
6262
{
6363
self::getUser();
6464

65+
6566
View::$forceWrapper = true; // this will hard refresh the wrapper
6667

6768
if (CarbonPHP::$app_local) {
68-
throw new PublicAlert('You should run the live version on <a id="staticSite" href="http://dev.carbonphp.com:3000/" style="color:#ff0084">port 3000</a> with the command<br/><b>>> npm start </b>
69-
<br/>To bypass this message <a href="http://dev.carbonphp.com:8080/releases/10.4.3/" style="color:blue">click here</a>');
69+
throw new PublicAlert('You should run the live version on <a id="staticSite" href="http://local.carbonphp.com:3000/" style="color:#ff0084">port 3000</a> with the command<br/><b>>> npm start </b>
70+
<br/>To bypass this message <a href="http://local.carbonphp.com:8080/releases/10.4.3/" style="color:blue">click here</a>');
7071
}
7172

7273
$this->fullPage()(CarbonPHP::$app_root . self::REACT);
@@ -298,7 +299,7 @@ function IsJsonString(str) {
298299
$(document).ready(function () {
299300
300301
//create a new WebSocket object.
301-
let wsUri = "ws://dev.carbonphp.com:8888/ws";
302+
let wsUri = "ws://local.carbonphp.com:8888/ws";
302303
let websocket = new WebSocket(wsUri);
303304
304305
@@ -643,7 +644,7 @@ public static function configuration(): array
643644
CarbonPHP::REBUILD => false
644645
],
645646
CarbonPHP::SITE => [
646-
CarbonPHP::URL => CarbonPHP::$app_local ? 'dev.carbonphp.com' : 'carbonphp.com', /* Evaluated and if not the accurate Redirect. Local php server okay. Remove for any domain */
647+
CarbonPHP::URL => CarbonPHP::$app_local ? 'local.carbonphp.com' : 'carbonphp.com', /* Evaluated and if not the accurate Redirect. Local php server okay. Remove for any domain */
647648
CarbonPHP::ROOT => CarbonPHP::$app_root, /* This was defined in our ../index.php */
648649
CarbonPHP::CACHE_CONTROL => [
649650
'ico|pdf|flv' => 'Cache-Control: max-age=29030400, public',

src/Database.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ public static function scanAndRunRefreshDatabase(string $tableDirectory): bool
10471047
AND REFERENCED_COLUMN_NAME = ?
10481048
AND TABLE_NAME = ?
10491049
AND COLUMN_NAME = ?
1050-
;', self::$carbonDatabaseName, $internalTableName, $internalColumnName, $externalTableName, $externalColumnName);
1050+
;', self::$carbonDatabaseName, $externalTableName, $externalColumnName, $internalTableName, $internalColumnName);
10511051

10521052
if ([] === $values) {
10531053

startApplication.bash

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ APP_ROOT=$(pwd)
44

55
file="/etc/hosts"
66

7-
if ! grep -q dev.carbonphp.com "$file"; then
8-
sudo -- sh -c "echo 127.0.0.1 dev.carbonphp.com >> $file"
7+
if ! grep -q local.carbonphp.com "$file"; then
8+
sudo -- sh -c "echo 127.0.0.1 local.carbonphp.com >> $file"
99
fi
1010

1111
cd "$APP_ROOT" || exit
1212

13-
sudo php -S dev.carbonphp.com:80 index.php || sudo php -S dev.carbonphp.com:8080 index.php
13+
sudo php -S local.carbonphp.com:80 index.php || sudo php -S local.carbonphp.com:8080 index.php

startApplication.bat

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ echo %mypath:~0,-1%
55

66
SET NEWLINE=^& echo.
77

8-
FIND /C /I "dev.carbonphp.com" %WINDIR%\system32\drivers\etc\hosts
9-
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^127.0.0.1 dev.carbonphp.com>>%WINDIR%\System32\drivers\etc\hosts
8+
FIND /C /I "local.carbonphp.com" %WINDIR%\system32\drivers\etc\hosts
9+
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^127.0.0.1 local.carbonphp.com>>%WINDIR%\System32\drivers\etc\hosts
1010

11-
php -S dev.carbonphp.com:80 index.php || php -S dev.carbonphp.com:8080 index.php
11+
php -S local.carbonphp.com:80 index.php || php -S local.carbonphp.com:8080 index.php

temp/README.md

-1
This file was deleted.

tests/feature/Config.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
abstract class Config extends TestCase
1212
{
13-
public const URL = 'http://dev.carbonphp.com/';
13+
public const URL = 'http://local.carbonphp.com/';
1414

1515
public const ADMIN_USERNAME = 'admin';
1616

@@ -69,7 +69,7 @@ public function setUp() : void /* The :void return type declaration that should
6969
'HTTP_UPGRADE_INSECURE_REQUESTS' => '1',
7070
'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
7171
'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
72-
'HTTP_REFERER' => 'http://dev.carbonphp.com/'
72+
'HTTP_REFERER' => 'http://local.carbonphp.com/'
7373
];
7474

7575
}

view/assets/react/.env

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
REACT_APP_TAG=10.4.3
2-
REACT_APP_URI=view/releases/10.4.3
1+
REACT_APP_TAG=10.5.9
2+
REACT_APP_URI=view/releases/10.5.9
33
NODE_PATH=./src
4-
HOST=dev.carbonphp.com
5-
PUBLIC_URL=//carbonphp.com/view/releases/10.4.3
4+
HOST=local.carbonphp.com
5+
PUBLIC_URL=//carbonphp.com/view/releases/10.5.9

view/assets/react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"sweetalert": "^2.1.2"
4646
},
4747
"scripts": {
48-
"env": "TAG=$( git describe --tags `git rev-list --tags --max-count=1` ) && printf \"REACT_APP_TAG=${TAG}\nREACT_APP_URI=view/releases/${TAG}\nNODE_PATH=./src\nHOST=dev.carbonphp.com\nPUBLIC_URL=//carbonphp.com/view/releases/$( git describe --tags `git rev-list --tags --max-count=1` )\" > .env",
48+
"env": "TAG=$( git describe --tags `git rev-list --tags --max-count=1` ) && printf \"REACT_APP_TAG=${TAG}\nREACT_APP_URI=view/releases/${TAG}\nNODE_PATH=./src\nHOST=local.carbonphp.com\nPUBLIC_URL=//carbonphp.com/view/releases/$( git describe --tags `git rev-list --tags --max-count=1` )\" > .env",
4949
"start": "npm run env && react-scripts start",
5050
"build": "npm run env && react-scripts build",
5151
"test": "react-scripts test --env=jsdom",

view/assets/react/src/assets/examples/CacheControl.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public static function configuration(): array
66
{
77
return [
88
'SITE' => [
9-
'URL' => APP_LOCAL ? 'dev.carbonphp.com' : 'carbonphp.com', /* Evaluated and if not the accurate Redirect. Local php server okay. Remove for any domain */
9+
'URL' => APP_LOCAL ? 'local.carbonphp.com' : 'carbonphp.com', /* Evaluated and if not the accurate Redirect. Local php server okay. Remove for any domain */
1010
'ROOT' => APP_ROOT, /* This was defined in our ../index.php */
1111
'CACHE_CONTROL' => [
1212
'ico|pdf|flv' => 'Cache-Control: max-age=29030400, public',

view/assets/react/src/assets/examples/CarbonPHPConfig.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ public static function configuration(): array
346346
'REBUILD' => false
347347
],
348348
'SITE' => [
349-
'URL' => APP_LOCAL ? 'dev.carbonphp.com' : 'carbonphp.com', /* Evaluated and if not the accurate Redirect. Local php server okay. Remove for any domain */
349+
'URL' => APP_LOCAL ? 'local.carbonphp.com' : 'carbonphp.com', /* Evaluated and if not the accurate Redirect. Local php server okay. Remove for any domain */
350350
'ROOT' => APP_ROOT, /* This was defined in our ../index.php */
351351
'CACHE_CONTROL' => [
352352
'ico|pdf|flv' => 'Cache-Control: max-age=29030400, public',

view/assets/react/src/setupProxy.js

+5-16
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const {createProxyMiddleware} = require('http-proxy-middleware');
22

3-
3+
const target = 'http://dev.carbonphp.com:8080/';
44

55
module.exports = function (app) {
66
app.use('/rest/**', createProxyMiddleware({
7-
target: 'http://dev.carbonphp.com:8080/',
7+
target: target,
88
changeOrigin: true,
99
secure: false,
1010
proxyTimeout: 4000,
@@ -17,7 +17,7 @@ module.exports = function (app) {
1717
'/view/**',
1818
'!/' + process.env.REACT_APP_URI + '/**'
1919
],{
20-
target: 'http://dev.carbonphp.com:8080/',
20+
target: target,
2121
changeOrigin: true,
2222
secure: false,
2323
proxyTimeout: 4000,
@@ -27,7 +27,7 @@ module.exports = function (app) {
2727
logLevel: "debug"
2828
}));
2929
app.use('/view/releases/2.0.0/**', createProxyMiddleware({
30-
target: 'http://dev.carbonphp.com:8080/',
30+
target: target,
3131
changeOrigin: true,
3232
secure: false,
3333
proxyTimeout: 4000,
@@ -37,20 +37,9 @@ module.exports = function (app) {
3737
logLevel: "debug"
3838
}));
3939
app.use('/carbon/**', createProxyMiddleware({
40-
target: 'http://dev.carbonphp.com:8080/',
41-
changeOrigin: true,
42-
secure: false,
43-
proxyTimeout: 4000,
44-
pathRewrite(path, req) {
45-
return path.replace(/^\/carbons/, 'carbons')
46-
},
47-
logLevel: "debug"
48-
}));
49-
app.use('/carbon/**', createProxyMiddleware({
50-
target: 'ws://dev.carbonphp.com:8888/ws',
40+
target: target,
5141
changeOrigin: true,
5242
secure: false,
53-
ws: true,
5443
proxyTimeout: 4000,
5544
pathRewrite(path, req) {
5645
return path.replace(/^\/carbons/, 'carbons')

wp-content/themes/documentation/index.php

-5
This file was deleted.

0 commit comments

Comments
 (0)