Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Incrementing DB values
Post: RE: Incrementing DB values

I was finally able to get around to the use case where I needed to do this and here is what worked for me. PHP Code: -- $this->set('field', 'field + ' . $this->db->escape($amount]), false) ->...
3,022 Views
3 Replies
05-14-2021, 09:48 AM
Derek
    Thread: getStatusCode Deprecation
Post: RE: getStatusCode Deprecation

OK, thanks for letting me know. I won't worry about replacing it then.
2,271 Views
2 Replies
05-04-2021, 07:51 AM
Derek
    Thread: Apache Headers on Incoming Request
Post: RE: Apache Headers on Incoming Request

So I actually discovered that CodeIgniter has something in place in the .htaccess to make sure that the authorization header does get passed through but for some reason in my setup that wasn't working...
4,408 Views
2 Replies
04-29-2021, 02:54 PM
Derek
    Thread: getStatusCode Deprecation
Post: getStatusCode Deprecation

In CodeIgniter\HTTP\ResponseInterface the getStatusCode function is deprecated and says, "To be replaced by the PSR-7 version (compatible)". I am curious as to why this was deprecated since it is part...
2,271 Views
2 Replies
04-29-2021, 02:40 PM
Derek
    Thread: Disable Code Coverage
Post: Disable Code Coverage

When I run my tests it produces a coverage report by default. I use TDD to build my app so the majority of the time, a coverage report is kind of useless because I'm only running one test or one class...
1,092 Views
1 Replies
03-26-2021, 01:57 PM
Derek
    Thread: Apache Headers on Incoming Request
Post: Apache Headers on Incoming Request

I deal mostly in building API's and lately my authentication has been coming through as a Bearer Token passed in through an "Authorization" header. The problem that I have is that the IncomingRequest ...
4,408 Views
2 Replies
12-23-2020, 11:50 AM
Derek
    Thread: Incrementing DB values
Post: Incrementing DB values

Is there a way in CI4 to increment a value in a database in one query? I would like to be able to do something like: Code: -- UPDATE table set field = field+5 where some_condition -- I know I...
3,022 Views
3 Replies
11-12-2020, 04:54 PM
Derek
    Thread: Testing JSON/XML requests with Feature Tests
Post: Testing JSON/XML requests with Feature Tests

Currently, when creating an API that is expecting to receive a JSON or XML request body, the Feature Test functionality doesn't work because the body of the request is never set. I would request that ...
1,604 Views
0 Replies
10-04-2020, 01:56 PM
Derek
    Thread: Testing a PUT call with validation is failing
Post: Testing a PUT call with validation is failing

I am trying to add some validation to my controller but my tests are failing because the request is trying to treat the PUT call as if it was a string. My test looks like this: PHP Code: -- class Us...
855 Views
0 Replies
06-16-2020, 09:58 AM
Derek
    Thread: Setting Request Headers in Feature Tests
Post: Setting Request Headers in Feature Tests

I am creating an API with CI4 and the authentication is utilizing a Bearer token in the authorization header of the request. It would be nice if I could set that when running a feature test using $thi...
1,273 Views
0 Replies
06-09-2020, 02:17 PM
Derek

Theme © iAndrew 2016 - Forum software by © MyBB