create-prisma-php-app 1.27.2 → 1.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bootstrap.php
CHANGED
|
@@ -819,7 +819,7 @@ try {
|
|
|
819
819
|
if (Request::$isWire && !$_secondRequestC69CD) {
|
|
820
820
|
$_requestFilesData = PrismaPHPSettings::$includeFiles;
|
|
821
821
|
|
|
822
|
-
if ($_requestFilesData[Request::$uri]) {
|
|
822
|
+
if (isset($_requestFilesData[Request::$uri])) {
|
|
823
823
|
$_requestDataToLoop = $_requestFilesData[Request::$uri];
|
|
824
824
|
|
|
825
825
|
foreach ($_requestDataToLoop['includedFiles'] as $file) {
|
|
@@ -8,10 +8,10 @@ const { __dirname } = getFileMeta();
|
|
|
8
8
|
const parser = new Engine({
|
|
9
9
|
parser: {
|
|
10
10
|
php8: true,
|
|
11
|
-
|
|
11
|
+
suppressErrors: true,
|
|
12
12
|
},
|
|
13
13
|
ast: {
|
|
14
|
-
withPositions:
|
|
14
|
+
withPositions: false,
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
17
|
|
|
@@ -58,10 +58,6 @@ async function getAllPhpFiles(dir: string): Promise<string[]> {
|
|
|
58
58
|
return files;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
function preprocessPhpCode(code: string): string {
|
|
62
|
-
return code.replace(/<<<['"]?[A-Z_]+['"]?[\s\S]*?[A-Z_]+\s*;/g, "'';");
|
|
63
|
-
}
|
|
64
|
-
|
|
65
61
|
function combineNamespaces(
|
|
66
62
|
baseNamespace: string,
|
|
67
63
|
subNamespace: string
|
|
@@ -74,10 +70,7 @@ function combineNamespaces(
|
|
|
74
70
|
async function analyzeImportsInFile(
|
|
75
71
|
filePath: string
|
|
76
72
|
): Promise<Record<string, string>> {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
// Preprocess the PHP code
|
|
80
|
-
code = preprocessPhpCode(code);
|
|
73
|
+
const code = await fs.readFile(filePath, "utf-8");
|
|
81
74
|
|
|
82
75
|
try {
|
|
83
76
|
// Parse the PHP file to AST
|
|
@@ -13,10 +13,10 @@ const PHPX_BASE_CLASS = "PHPX";
|
|
|
13
13
|
const parser = new Engine({
|
|
14
14
|
parser: {
|
|
15
15
|
php8: true,
|
|
16
|
-
|
|
16
|
+
suppressErrors: true,
|
|
17
17
|
},
|
|
18
18
|
ast: {
|
|
19
|
-
withPositions:
|
|
19
|
+
withPositions: false,
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -33,16 +33,8 @@ async function saveLogData(logData: Record<string, any>) {
|
|
|
33
33
|
await fs.writeFile(LOG_FILE, JSON.stringify(logData, null, 2));
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function preprocessPhpCode(code: string): string {
|
|
37
|
-
// Match heredocs and nowdocs and replace them with placeholders
|
|
38
|
-
return code.replace(/<<<['"]?[A-Z_]+['"]?[\s\S]*?[A-Z_]+\s*;/g, "'';");
|
|
39
|
-
}
|
|
40
|
-
|
|
41
36
|
async function analyzePhpFile(filePath: string) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// Preprocess the PHP code
|
|
45
|
-
code = preprocessPhpCode(code);
|
|
37
|
+
const code = await fs.readFile(filePath, "utf-8");
|
|
46
38
|
|
|
47
39
|
try {
|
|
48
40
|
// Parse the PHP file to AST
|