Skip to content

Commit d259b44

Browse files
authored
Merge pull request #209 from jakubkulhan/0.6.x-add-make-generate-and-always-run-it-before-all-other-make-commands
[0.6.x] Add make generate and always run it before all other make commands
2 parents 8258870 + a3d95c6 commit d259b44

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ endif
3232
all: ## Runs everything ###
3333
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -v "###" | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | xargs --open-tty $(MAKE)
3434

35+
generate: ## Generate code based on spec
36+
$(DOCKER_RUN) php spec/generate.php
37+
3538
cs-fix: ## Fix any automatically fixable code style issues
3639
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./phpcs.xml -vvvv
3740

spec/generate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ function amqpTypeToLength(string $type, string $e): array
310310
$connectionContent .= " }\n";
311311
$connectionContent .= "\n";
312312
$connectionContent .= " \$this->channels->get(\$frame->channel)->onFrameReceived(\$frame);\n";
313-
$connectionContent .= " } catch (Throwable \$e) {\n";
314-
$connectionContent .= " \$this->emit('error', [\$e]);\n";
313+
$connectionContent .= " } catch (Throwable \$error) {\n";
314+
$connectionContent .= " \$this->emit('error', [\$error]);\n";
315315
$connectionContent .= " }\n";
316316
$connectionContent .= " }\n";
317317
$connectionContent .= " });\n";

0 commit comments

Comments
 (0)