Skip to content

Commit b0111d6

Browse files
committed
Rewrite using PHPParser directly
1 parent 9bd5a67 commit b0111d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2546
-2129
lines changed

.editorconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ end_of_line = crlf
1616
[*.{yml, yaml}]
1717
indent_size = 2
1818

19-
[*.twig]
19+
[*.{twig, html}]
2020
indent_size = 2
21-
insert_final_newline = false
22-
trim_trailing_whitespace = false
2321

2422
[Dockerfile]
2523
indent_size = 2

Makefile

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,26 @@ composer.phar:
6464
install: composer.phar
6565
$(PHP8) $(COMPOSER) install
6666

67-
define cakephp
67+
define cakephp3
6868
build-cakephp-$(VERSION): install
6969
cd $(CAKEPHP_SOURCE_DIR) && git checkout -f $(TAG)
7070
cd $(CAKEPHP_SOURCE_DIR) && $(PHP7) $(COMPOSER) update
7171
mkdir -p $(BUILD_DIR)/cakephp/$(VERSION)
7272
cp -r static/assets/* $(BUILD_DIR)/cakephp/$(VERSION)
7373

74-
$(PHP8) bin/apitool.php generate --config cakephp --version $(VERSION) \
75-
$(CAKEPHP_SOURCE_DIR) $(BUILD_DIR)/cakephp/$(VERSION)
74+
$(PHP8) bin/apitool.php generate --config cakephp3 --version $(VERSION) \
75+
--output-dir $(BUILD_DIR)/cakephp/$(VERSION) $(CAKEPHP_SOURCE_DIR)
76+
endef
77+
78+
define cakephp4
79+
build-cakephp-$(VERSION): install
80+
cd $(CAKEPHP_SOURCE_DIR) && git checkout -f $(TAG)
81+
cd $(CAKEPHP_SOURCE_DIR) && $(PHP7) $(COMPOSER) update
82+
mkdir -p $(BUILD_DIR)/cakephp/$(VERSION)
83+
cp -r static/assets/* $(BUILD_DIR)/cakephp/$(VERSION)
84+
85+
$(PHP8) bin/apitool.php generate --config cakephp4 --version $(VERSION) \
86+
--output-dir $(BUILD_DIR)/cakephp/$(VERSION) $(CAKEPHP_SOURCE_DIR)
7687
endef
7788

7889
define cakephp5
@@ -94,7 +105,7 @@ build-chronos-$(VERSION): install
94105
cp -r static/assets/* $(BUILD_DIR)/chronos/$(VERSION)
95106

96107
php bin/apitool.php generate --config chronos --version $(VERSION) \
97-
$(CHRONOS_SOURCE_DIR) $(BUILD_DIR)/chronos/$(VERSION)
108+
--output-dir $(BUILD_DIR)/chronos/$(VERSION) $(CHRONOS_SOURCE_DIR)
98109
endef
99110

100111
define elastic
@@ -105,7 +116,7 @@ build-elastic-$(VERSION): install
105116
cp -r static/assets/* $(BUILD_DIR)/elastic-search/$(VERSION)
106117

107118
$(PHP8) bin/apitool.php generate --config elastic --version $(VERSION) \
108-
$(ELASTIC_SOURCE_DIR) $(BUILD_DIR)/elastic-search/$(VERSION)
119+
--output-dir $(BUILD_DIR)/elastic-search/$(VERSION) $(ELASTIC_SOURCE_DIR)
109120
endef
110121

111122
define queue
@@ -116,7 +127,7 @@ build-queue-$(VERSION): install
116127
cp -r static/assets/* $(BUILD_DIR)/queue/$(VERSION)
117128

118129
$(PHP8) bin/apitool.php generate --config queue --version $(VERSION) \
119-
$(QUEUE_SOURCE_DIR) $(BUILD_DIR)/queue/$(VERSION)
130+
--output-dir $(BUILD_DIR)/queue/$(VERSION) $(QUEUE_SOURCE_DIR)
120131
endef
121132

122133
# Build all the versions in a loop.
@@ -125,35 +136,35 @@ build-all: $(foreach version, $(CAKEPHP_VERSIONS), build-cakephp-$(version)) $(f
125136
# Generate build targets for cakephp
126137
TAG:=3.8.13
127138
VERSION:=3.8
128-
$(eval $(cakephp))
139+
$(eval $(cakephp3))
129140

130141
TAG:=3.9.10
131142
VERSION:=3.9
132-
$(eval $(cakephp))
143+
$(eval $(cakephp3))
133144

134145
TAG:=origin/3.x
135146
VERSION:=3.10
136-
$(eval $(cakephp))
147+
$(eval $(cakephp3))
137148

138149
TAG:=4.0.9
139150
VERSION:=4.0
140-
$(eval $(cakephp))
151+
$(eval $(cakephp4))
141152

142153
TAG:=4.1.7
143154
VERSION:=4.1
144-
$(eval $(cakephp))
155+
$(eval $(cakephp4))
145156

146157
TAG:=4.2.10
147158
VERSION:=4.2
148-
$(eval $(cakephp))
159+
$(eval $(cakephp4))
149160

150161
TAG:=origin/4.x
151162
VERSION:=4.3
152-
$(eval $(cakephp))
163+
$(eval $(cakephp4))
153164

154165
TAG:=origin/4.next
155166
VERSION:=4.next
156-
$(eval $(cakephp))
167+
$(eval $(cakephp4))
157168

158169
TAG:=origin/5.x
159170
VERSION:=5.0

composer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
"description": "API docs for CakePHP",
44
"type": "application",
55
"config": {
6-
"sort-packages": true
6+
"sort-packages": true,
7+
"allow-plugins": {
8+
"dealerdirect/phpcodesniffer-composer-installer": true
9+
}
710
},
811
"require": {
9-
"php": ">=7.4",
12+
"php": ">=8.0",
1013
"cakephp/collection": "^4.0",
1114
"cakephp/console": "^4.0",
1215
"composer/composer": "^2.0",
1316
"erusev/parsedown": "^1.7",
17+
"nikic/php-parser": "^4.13",
1418
"phpdocumentor/reflection": "^4.0",
1519
"phpdocumentor/reflection-common": "^2.1",
1620
"phpdocumentor/reflection-docblock": "^5.1",

composer.lock

Lines changed: 45 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)