Skip to content

Conversation

@tjwiebell
Copy link
Contributor

Begin work stubbing out the entry point for this app

*
* @return \Zend\Http\Response
*/
public function run(): \Zend\Http\Response
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought was this would be a good use case for __invoke() but I'm not absolutely stuck on that idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this change assuming this would be the only public method. I'm not a fan of calling $controller() in bin/upward, if you have a better naming convention.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷‍♂️ Naming stuff is one of the two hard things in programming.

Calling this class a "Controller" was the closest concept I could think of for it's purpose, but I welcome any better ideas.

…tion

- Pass configuration to controller captured from environment variable
- Fix package.json warnings
@tjwiebell
Copy link
Contributor Author

Resolves: #11
Resolves: #12
Resolves: #13

bin/upward Outdated
if (!$upwardConfig) {
// this appears to violate the spec, since we can't kill the server until we receive a request
// will leave here for right now until we can discuss with Z
posix_kill(posix_getpid(), SIGKILL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're sending a KILL signal back to ourselves? That seems bit like overkill.

Seriously though, I think the exit(1) below should be just as effective and a lot cleaner than this line. Either way, I get the feeling that having both is redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think this needs discussed further. Technically the server should never start if config is missing or malformed, but given the current logic, that validation would have to be in that shell script that starts the server.

This doesn't conform to the spec now anyway, so I'll just remove the SIGKILL.

…ctionality with James

- Refactor after renaming of DefinitionIterator
- Write unit test for Controller
@bbatsche bbatsche merged commit d920273 into master Dec 19, 2018
@bbatsche bbatsche deleted the feature/controller branch December 19, 2018 19:31
magento-devops-reposync-svc pushed a commit that referenced this pull request Apr 9, 2025
Added 7.x version of symfony yaml in the dependency list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants