Skip to content

feat(laravel-soap-199): Add Events & Ray support #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---

### Reproduction

If possible, provide a boiled down editable reproduction using a service like JSFiddle, Codepen, CodeSandbox, or a GitHub repository based on this template: https://github.com/piniajs/bug-report. A failing unit test is even better! Otherwise provide as much information as possible to reproduce the problem. You can find examples of different environments at https://github.com/piniajs?q=example&type=source and use them as a bug reproduction.
If no reproduction is provided and the information is not enough to reproduce the problem, we won't be able to give it a look **and the issue will be converted into a question and moved to discussions**.

### Steps to reproduce the behavior

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Expected behavior

A clear and concise description of what you expected to happen.

### Actual behavior

A clear and concise description of what actually happens.

### Additional information

Add any other context about the problem here.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/CodeDredd/laravel-soap/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/CodeDredd/laravel-soap/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/CodeDredd/laravel-soap/security/policy
about: Learn how to notify us for sensitive bugs
- name: Report a bug
url: https://github.com/CodeDredd/laravel-soap/issues/new
about: Report a reproducable bug
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
### What problem is this solving

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
A clear and concise description of what the problem is. Ex. when using the function X we cannot do Y.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
### Proposed solution

A clear and concise description of what you want to happen with an API proposal when applicable

**Are you able to assist bring the feature to reality?**
no | yes, I can...
### Describe alternatives you've considered

**Additional context**
Add any other context or screenshots about the feature request here.
A clear and concise description of any alternative solutions or features you've considered.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.env
.php_cs
.php_cs.cache
.phpunit.result.cache
Expand All @@ -12,3 +13,4 @@ testbench.yaml
vendor
node_modules
.php-cs-fixer.cache
ray.php
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"robrichards/wse-php": "^2.0",
"php-soap/psr18-transport": "^1.2",
"php-soap/psr18-wsse-middleware": "^1.1",
"veewee/xml": "^1.3"
"veewee/xml": "^1.3",
"spatie/laravel-package-tools": "^1.11",
"illuminate/contracts": "^9.0"
},
"require-dev": {
"symfony/options-resolver": "^5.4.3",
Expand All @@ -36,7 +38,8 @@
"laminas/laminas-code": "^4.5.1",
"nunomaduro/larastan": "^2.0",
"nunomaduro/collision": "^6.1",
"symplify/easy-ci": "^10.0"
"symplify/easy-ci": "^10.0",
"spatie/laravel-ray": "^1.29"
},
"autoload": {
"psr-4": {
Expand Down
84 changes: 72 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions config/soap.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
'namespace' => 'App\\Soap',
],

/*
|--------------------------------------------------------------------------
| SOAP Code Generation directory
|--------------------------------------------------------------------------
|
| Define the destination for the code generator under the app directory
*/

'ray' => [
'send_soap_client_requests' => false,
],

/*
|--------------------------------------------------------------------------
| SOAP Client Configuration
Expand Down
26 changes: 26 additions & 0 deletions src/Client/Events/ConnectionFailed.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace CodeDredd\Soap\Client\Events;

use CodeDredd\Soap\Client\Request;

class ConnectionFailed
{
/**
* The request instance.
*
* @var \CodeDredd\Soap\Client\Request
*/
public $request;

/**
* Create a new event instance.
*
* @param \CodeDredd\Soap\Client\Request $request
* @return void
*/
public function __construct(Request $request)
{
$this->request = $request;
}
}
24 changes: 24 additions & 0 deletions src/Client/Events/RequestSending.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace CodeDredd\Soap\Client\Events;

use CodeDredd\Soap\Client\Request;

class RequestSending
{
/**
* The request instance.
*/
public Request $request;

/**
* Create a new event instance.
*
* @param Request $request
* @return void
*/
public function __construct(Request $request)
{
$this->request = $request;
}
}
36 changes: 36 additions & 0 deletions src/Client/Events/ResponseReceived.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace CodeDredd\Soap\Client\Events;

use CodeDredd\Soap\Client\Request;
use CodeDredd\Soap\Client\Response;

class ResponseReceived
{
/**
* The request instance.
*
* @var \CodeDredd\Soap\Client\Request
*/
public Request $request;

/**
* The response instance.
*
* @var \CodeDredd\Soap\Client\Response
*/
public Response $response;

/**
* Create a new event instance.
*
* @param \CodeDredd\Soap\Client\Request $request
* @param \CodeDredd\Soap\Client\Response $response
* @return void
*/
public function __construct(Request $request, Response $response)
{
$this->request = $request;
$this->response = $response;
}
}
Loading