text:
[5.2] - InvalidArgumentException - No handler registered for command [App\Jobs\TestJob]

I did not upgrade from 5.1 to 5.2, though it still seems that I am getting this error as well on v5.2.45.
I do have Illuminate\Bus\BusServiceProvider::class, in my app.php file.
InvalidArgumentException \vendor\laravelcollective\bus\src\Dispatcher.php:348
No handler registered for command [App\Jobs\TestJob]

I have attempted to call the job in multiple different ways.
$queue = Queue::later(\Carbon\Carbon::now()->addMinutes(1), (new \App\Jobs\TestJob(\Carbon\Carbon::now())));

$job = (new \App\Jobs\TestJob(\Carbon\Carbon::now()))->delay(10);
$queue = dispatch($job);

All attempts result in the same exception and fail.
[2016-08-29 09:22:22] Failed: App\Jobs\TestJob

My TestJob.php:
<?php

namespace App\Jobs;

use Carbon\Carbon;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Mail;

class TestJob extends Job implements ShouldQueue
{
    use InteractsWithQueue, SerializesModels;

    /**
     * @var Carbon
     */
    protected $date_scheduled;

    /**
     * Create a new job instance.
     *
     * @param Carbon $date_scheduled
     */
    public function __construct(Carbon $date_scheduled)
    {
        $this->date_scheduled = $date_scheduled;
    }

    /**
     * Execute the job.
     */
    public function handle()
    {
        $scheduled = $this->date_scheduled->format(DATE_RFC3339);
        $fired = Carbon::now()->format(DATE_RFC3339);
        Mail::raw("Scheduled at {$scheduled} and job fired at {$fired}", function ($m) {
            $m->from('test@example.com', 'Test');
            $m->to('dak@example.com', 'Dak');
            $m->subject('TEST');
        });
    }
}

Replaced e-mail addresses for privacy reasons.
As you can see, it has a handle() method. I saw in the stack trace to confirm that it is looking for the handle() method.
// \vendor\laravelcollective\bus\src\Dispatcher.php:200 Collective\Bus\Dispatcher::Collective\Bus\{closure}
return $this->container->call([$command, 'handle']);

I just can't seem to figure out what is wrong. :disappointed:
Please help :cry:

We've removed the ability to have non-self handling commands in L5.2. This was partially restored in 5.3 though.

Please run composer show -i.

aftership/aftership-php-sdk           5.0.9              The PHP SDK of AfterShip API
barryvdh/laravel-cors                 v0.8.2             Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
barryvdh/laravel-dompdf               v0.6.1             A DOMPDF Wrapper for Laravel
bugsnag/bugsnag                       v3.3.0             Official Bugsnag notifier for PHP applications.
bugsnag/bugsnag-laravel               v2.3.0             Official Bugsnag notifier for Laravel applications.
bugsnag/bugsnag-psr-logger            v1.1.0             Official Bugsnag PHP PSR Logger.
chumper/zipper                        0.6.1              This is a little neat helper for the ZipArchive methods with handy functions
classpreloader/classpreloader         3.0.0              Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case
composer/ca-bundle                    1.0.3              Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
dnoegel/php-xdg-base-dir              0.1                implementation of xdg base directory specification for php
doctrine/annotations                  v1.2.7             Docblock Annotations Parser
doctrine/cache                        v1.6.0             Caching library offering an object-oriented API for many cache backends
doctrine/collections                  v1.3.0             Collections Abstraction library
doctrine/common                       v2.6.1             Common Library for Doctrine projects
doctrine/dbal                         v2.5.4             Database Abstraction Layer
doctrine/inflector                    v1.1.0             Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator                 1.0.5              A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                        v1.0.1             Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
dompdf/dompdf                         v0.6.2             DOMPDF is a CSS 2.1 compliant HTML to PDF converter
drewm/mailchimp-api                   v2.2.4             Super-simple, minimum abstraction MailChimp API v3 wrapper
fabpot/goutte                         v3.1.2             A simple PHP Web Scraper
fzaninotto/faker                      v1.6.0             Faker is a PHP library that generates fake data for you.
guzzle/guzzle                         v3.9.3             PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle
guzzlehttp/guzzle                     6.2.1              Guzzle is a PHP HTTP client library
guzzlehttp/promises                   1.2.0              Guzzle promises library
guzzlehttp/psr7                       1.3.1              PSR-7 message implementation
hamcrest/hamcrest-php                 v1.2.2             This is the PHP port of Hamcrest Matchers
intervention/image                    2.3.7              Image handling and manipulation library with support for Laravel integration
ircmaxell/random-lib                  v1.1.0             A Library For Generating Secure Random Numbers
ircmaxell/security-lib                1.0.0              A Base Security Library
jakub-onderka/php-console-color       0.1
jakub-onderka/php-console-highlighter v0.3.2
jeremeamia/SuperClosure               2.2.0              Serialize Closure objects, including their context and binding
laravel/framework                     v5.2.45            The Laravel Framework.
laravelbook/ardent                    v3.4.2             Self-validating smart models for Laravel 5's Eloquent ORM
laravelcollective/bus                 v5.2               The Laravel Bus (5.1) package for use in Laravel 5.2.
laravelcollective/html                v5.2.4             HTML and Form Builders for the Laravel Framework
laurentbrieu/tcpdf                    dev-master 1352a46 Composer wrapper for TCPDF PHP library
league/flysystem                      1.0.27             Filesystem abstraction: Many filesystems, one API.
league/fractal                        0.14.0             Handle the output of complex data structures ready for API output.
league/oauth2-client                  1.4.2              OAuth 2.0 Client Library
maatwebsite/excel                     2.1.4              An eloquent way of importing and exporting Excel and CSV in Laravel 4 with the power of PHPExcel
mandrill/mandrill                     1.0.55             API client library for the Mandrill email as a service platform
mannysoft/surveymonkey                dev-master e93d747 PHP class for SurveyMonkey API.
mockery/mockery                       0.9.5              Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succ...
monolog/monolog                       1.21.0             Sends your logs to files, sockets, inboxes, databases and various web services
mtdowling/cron-expression             v1.1.0             CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
nesbot/carbon                         1.21.0             A simple API extension for DateTime.
nikic/php-parser                      v2.1.0             A PHP parser written in PHP
pacely/mailchimp-apiv3                dev-master 859943e Simple API wrapper for Mailchimp API V3
paragonie/random_compat               v1.4.1             PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phenx/php-font-lib                    0.2.2              A library to read, parse, export and make subsets of different types of font files.
phpdocumentor/reflection-common       1.0                Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock     3.1.0              With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver           0.2
phpoffice/phpexcel                    1.8.1              PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
phpspec/prophecy                      v1.6.1             Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage             2.2.4              Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator             1.4.1              FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template             1.2.1              Simple template engine.
phpunit/php-timer                     1.0.8              Utility class for timing
phpunit/php-token-stream              1.4.8              Wrapper around PHP's tokenizer extension.
phpunit/phpunit                       4.8.27             The PHP Unit Testing framework.
phpunit/phpunit-mock-objects          2.3.8              Mock Object library for PHPUnit
psr/http-message                      1.0.1              Common interface for HTTP messages
psr/log                               1.0.0              Common interface for logging libraries
psy/psysh                             v0.7.2             An interactive shell for modern PHP.
sebastian/comparator                  1.2.0              Provides the functionality to compare PHP values for equality
sebastian/diff                        1.4.1              Diff implementation
sebastian/environment                 1.3.8              Provides functionality to handle HHVM/PHP environments
sebastian/exporter                    1.2.2              Provides the functionality to export PHP variables for visualization
sebastian/global-state                1.1.1              Snapshotting of global state
sebastian/recursion-context           1.0.2              Provides functionality to recursively process PHP variables
sebastian/version                     1.0.6              Library that helps with managing the version number of Git-hosted PHP projects
swiftmailer/swiftmailer               v5.4.3             Swiftmailer, free feature-rich PHP mailer
symfony/browser-kit                   v3.1.3             Symfony BrowserKit Component
symfony/console                       v3.0.9             Symfony Console Component
symfony/css-selector                  v3.0.9             Symfony CssSelector Component
symfony/debug                         v3.0.9             Symfony Debug Component
symfony/dom-crawler                   v3.0.9             Symfony DomCrawler Component
symfony/event-dispatcher              v2.8.9             Symfony EventDispatcher Component
symfony/finder                        v3.0.9             Symfony Finder Component
symfony/http-foundation               v3.0.9             Symfony HttpFoundation Component
symfony/http-kernel                   v3.0.9             Symfony HttpKernel Component
symfony/polyfill-mbstring             v1.2.0             Symfony polyfill for the Mbstring extension
symfony/polyfill-php56                v1.2.0             Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-util                 v1.2.0             Symfony utilities for portability of PHP codes
symfony/process                       v3.0.9             Symfony Process Component
symfony/routing                       v3.0.9             Symfony Routing Component
symfony/translation                   v3.0.9             Symfony Translation Component
symfony/var-dumper                    v3.0.9             Symfony mechanism for exploring and dumping PHP variables
symfony/yaml                          v3.1.3             Symfony Yaml Component
tijsverkoyen/css-to-inline-styles     1.5.5              CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.
vlucas/phpdotenv                      v2.3.0             Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
weblee/mandrill                       dev-master 809dedb Laravel 5 Mandrill API Wrapper
webmozart/assert                      1.1.0              Assertions to validate method input/output with nice error messages.
yajra/laravel-datatables-oracle       v6.17.0            jQuery DataTables API for Laravel 4|5

This bug will be related to the collective package. Nothing to do with laravel.

You could just use 1.x of this package: https://github.com/AltThree/Bus/tree/v1.1.0. I know it works. I wrote it and use it myself.

v2 of that package works with L5.3 too.

Thank you!

authors: GrahamCampbell Vinlock


text:
Attribute shadowing with join() is a security risk

The fact that attributes of  join()ed models are in the same namespace as the "base" query model provides a security risk.
For example say I have this query in my program:
function getUsers() {
  return User::whereNot("disabled");
}

A few months after coding this the project requirements change and we now have user groups as well, and we change the query to all users having a primary group :
function getUsers() {
  return User::join("groups", "groups.id", "=", "users.primary_group_id");
}

Also we always had some code that fetches users' orders which worked like this:
Order::where("user_id", $someUser->id);

Now with the old version of the getUsers function this would be fine, because ->id is the correct user id. However with the added join the ->id field may now be the group id, which breaks the logic and may result in wrong joins. This is a possible security risk!
Coming from other ORMs such as Django, SQLAlchemy, Active Record, ... this was a huge surprise for us and it actually caused other people's data being shown to people. For now we have implemented a custom checker for "->join() without ->select()", which does not really solve the problem but minimises the chances that you simply forget about adding a ->select() clause, as pictured above.
I believe this to be a severe security problem that should be fixed. I'm unaware of any well-known ORM that inlines related objects' attributes into the base object namespace.

This bug is probably the same as in #16645
When joining the groups table the generated query is something like:
SELECT *
FROM `users`
INNER JOIN `groups` ON `groups`.`id` = `users`.`primary_group_id`

Since both columns have an id column the one from the groups table will override the one from the users table when turning this into an array...
I have some ideas on how to fix this but I can work on it right now, I'll give it a try on the weekend if no1 fixes it by then...

I think we should close this IMO

This is normal SQL behavior when doing a join. Use a select clause, that is what they are meant for.

Maybe we just need to warn people about this in the join's section?

Maybe we just need to warn people about this in the join's section?

If you don't care about having severe security problems in your code base, then this is the way to go. Otherwise, from a pragmatic point of view, this problem has to be solved in Laravel. There will always be a good amount of people who don't read up on all the hints in the documentation and all of these people will have severe security problems in their code. Personally I would not want to be responsible for that.
Btw, SQL does not have this problem because you are forced to explicitly tell which ambiguous column you want to retrieve.

@taylorotwell ref #16914
Note my comment above; the problem is that you are adding an implicit select clause, which does not exist in SQL and which is the cause of the security issue.
I just had a look at #16895 which was also referenced here. While these issues are usually trivial to fix, it's not trivial to see them. They may even go unnoticed for a long time, causing seemingly meaningful data processing (see my initial post in this issue). This seems to be a fundamental problem in the way SQL is generated by Laravel. The Python web framework Django for example always prefixes columns with the table name. It never produces queries like SELECT id from table, but always SELECT table.id from table, so it doesn't get all the small potential bugs and security issues that Laravel has.

I do agree with you I really think that we should address this somehow, however it's not an ordinary fix and will introduce quite a BC, and in the end this can be avoided by properly calling the select method when using join's...
IMO we should address this at least for Eloquent since it's an ORM I think that it should handle this at least, there's many ppl having this problem and as you stated most of them didn't realize whats happening...
However this is argueable some may say it's something the ORM should handle other's will say it's something the developer who should resolve this situation...
I think that laravel/internals is a better place for this discussion since it's being considered as a proposal currently, maybe it'll get more attention there...

Maybe we just need to warn people about this in the join's section?

Yes please. :)

To add another real world example of where this happens, I reported this at laravel/framework#23548  as happening with hasManyThrough which is a lot less "manual" than the joins above yet is still an issue.
I can understand why this happens but personally was not aware at all that eloquent would actually select the id from the join table at all so didn't account for it.
This is actually a situation where simply saying "add a select clause" isn't really a valid answer because it's a relationship query. But I'd settle at least for there simply being a warning

When using the hasManyThrough relationship, if the foreign key on the joining table matches an column on the target models table this will be replaced with the value of the joining table. tl;dr: Do not use a foreign key column that matches a column on your target models table.

I have to say that I can't believe we're even having this discussion.
DB::select should just return the result array "as is" from the DB as you would get it form a query.
I have to agree 100% with the OP here, regardless of the potential risks or not.
I'm facing the same issue where I can't get all the fields and do with the result what I want to do - I'm not talking about Eloquent even, only basic DB Facade.
Example with 2 simple tables:
DB::select('select k.*, kd.* from kitchens as k left join kitchen_details as kd on k.id=kd.kitchen_id order by k.id desc limit 1');
MySql result:
|----------------------------------------------------------------------------------------------|
| id     | name	   | created_at          | id     | kitchen_id | seo     | created_at          |
|--------|---------|---------------------|--------|------------|---------|---------------------|
| 123456 | Example | 2021-01-06 10:05:13 | 654321 | 123456     | example | 2021-01-06 10:05:13 |
|----------------------------------------------------------------------------------------------|

DB::select results:
[
    {#4477
       +"id": 654321,
       +"name": "Example",
       +"created_at": "2021-01-06 10:05:13",
       +"kitchen_id": 123456,
       +"seo": "example",
    },
]

How does that even make sense to some of you?

source: gharchive/issue

authors: GrahamCampbell fernandobandeira hailwood ifullgaz jonashaag

repo: laravel/framework

license: MIT

license_type: permissive

license_source: github-api


text:
Bug with non image file upload

Laravel Version: 5.4.17
PHP Version: 7.1.3
Database Driver & Version: pdo_mysql, mysql 5.7.17

Description:
When uploaded files are of the type image, they get uploaded properly. Non-image (atleast PDF in my case) doesn't work.
Steps To Reproduce:

Make an upload form (with proper setup i.e. enctype and input component with multiple files)
Put validation in place ('field.*' => 'required|image')
Upload an image file, it should work
Change validation appropriately (required|mimesType:application/pdf)
With the same code upload a non-image file and you should get an error with the upload (validation.uploaded is triggered) in the session error

Some more details
Doing a dump on $request to investigate gave some more details, which may be helpful. When it errors, it has the following request dump:
0 => UploadedFile {#111
      -test: false
      -originalName: "filename.pdf"
      -mimeType: "application/octet-stream"
      -size: 0
      -error: 1
      #hashName: null
      path: ""
      filename: ""
      basename: ""
      pathname: ""
      extension: ""
      realPath: "CODEHOME/public"
      aTime: 1970-01-01 01:00:00
      mTime: 1970-01-01 01:00:00
      cTime: 1970-01-01 01:00:00
      inode: false
      size: false
      perms: 00
      owner: false
      group: false
      type: false
      writable: false
      readable: false
      executable: false
      file: false
      dir: false
      link: false
    }

but when it works, i.e. with the image file, the dump is more sensible
    0 => UploadedFile {#111
      -test: false
      -originalName: "12040002.jpg"
      -mimeType: "image/jpeg"
      -size: 807682
      -error: 0
      #hashName: null
      path: "/tmp"
      filename: "phpBTeakk"
      basename: "phpBTeakk"
      pathname: "/tmp/phpBTeakk"
      extension: ""
      realPath: "/tmp/phpBTeakk"
      aTime: 2017-04-04 22:56:50
      mTime: 2017-04-04 22:56:50
      cTime: 2017-04-04 22:56:50
      inode: 37365
      size: 807682
      perms: 0100600
      owner: 33
      group: 33
      type: "file"
      writable: true
      readable: true
      executable: false
      file: true
      dir: false
      link: false
    }

Note that while I have mentioned the validation details above, the dump is taken prior to the validator method in the controller, so it probably shouldn't have any impact on the issue.
As is visible, it's probably trying to upload the file to the project root, instead of '/tmp' when doing the non-image upload and that's why it's likely failing.
(I have just renamed the folder name in the dump to CODEHOME)

validation.uploaded means the file failed to upload, there are many reasons for that that you need to explore yourself.

You're correct, and that was my first thought as well.
As I have explained in the issue above, I have used the same upload form while changing only the type of file I uploaded. Also, the files being uploaded were from the same local folder.
The realPath changing makes me inclined to think that this could be a bug.
I will continue to check this further and report back if anything changes.

what is the size of the pdf you are uploading? Are you sure it is not greater than your file max size?

Okay, there is an update.
Good: Other files were uploading
Bad: One particular PDF is not uploading. Renaming it doesn't help either. It's not a secure file but of PDF-1.5 format. The ones I can upload are PDF-1.4

@laurencei wow, this is embarrassing. The one thing I should've checked, I never event thought to do. That's indeed the case.
Closing the bug

what is the size of the pdf you are uploading? Are you sure it is not greater than your file max size?

Thanks , it works for me .

same problem with me with any file what is the reason??


text:
Array to string conversion in DenyAuthorizationController.php (line 46)

Laravel Version: 5.5.*
PHP Version: 7.0

Laravel passport, after show me an Authorization Request View, i try to cancel the authorize, however i got an error in
vendor\laravel\passport\src\Http\Controllers\DenyAuthorizationController.php
        $authRequest = $this->getAuthRequestFromSession($request);

        $uri = $authRequest->getClient()->getRedirectUri();

        $separator = $authRequest->getGrantTypeId() === 'implicit' ? '#' : '?';

        return $this->response->redirectTo(
            $uri.$separator.'error=access_denied&state='.$request->input('state')
        );

the $uri is in array method which contain my client redirect_uri
can someone help me how to solve this ? edit vendor should not a suggestion because

This repo is for bug tracking. Use the forums or slack channel for solving your issue


text:
Builder::where() with only one parameter acts like whereNull()

Laravel Version: 5.8.2
PHP Version: 7.2.16
Database Driver & Version: mySQL (MariaDB) 10.3.12

Description:
Making a call to Builder::where() with only a single $column param makes the method act like whereNull(). Even in a 'worst case' scenario, I'd expect it to be the opposite (i.e. where not null), although I'd argue it's better to just disallow calling where() with a single param.
Steps To Reproduce:
Create a basic DB call using where with a single param - e.g.:
echo DB::table("staff")->select("*")->where("name")->toSql();
the output will look like select * from `staff` where `name` is null
Notes
It looks like this is the case as all other columns default to null, but the prepareValueAndOperator method only acts when there are exactly two params passed, so value is still null.
Assuming this isn't expected behaviour (I cannot see documentation anywhere suggesting it should be!), I would suggest that trying to call where with only one param should throw an exception, or maybe act as where not null, but that still doesn't make much sense.
Happy to submit a PR assuming it's confirmed this isn't expected/intended behaviour.

I think it's a matter of perspective in this case. For me personally this is the expected behavior. The method signature is the following:
where($column, $operator = null, $value = null, $boolean = 'and')

So for me it's a where clause with the default operator and a value of null. I'd expect that to act like whereNull.
If you wish to change this behavior feel free to open up an issue on the ideas repo to get support for your idea. After that you can submit a PR. If this is changed then the best branch to target this is master.

authors: driesvints liam-wiltshire


text:
PHPUnit argument passed after artisan test --parallel command do not work

Laravel Version: 8.27.0
PHP Version: 7.4
Database Driver & Version: Postgres 13

Description:
Command php artisan test --parallel --do-not-cache-result fails to run with error message

The "--do-not-cache-result" option does not exist.

but according to the docs at https://laravel.com/docs/8.x/testing#running-tests

"Any arguments that can be passed to the phpunit command may also be passed to the Artisan test command"

it should work just fine.
The command itself works fine without the --parallel parameter, but I want to run it in parallel so...
The --do-not-cache-result command is documented here:
https://phpunit.readthedocs.io/en/9.5/textui.html?highlight=--do-not-cache-result #command-line-options
Steps To Reproduce:
Run php artisan test --parallel --do-not-cache-result command

That's a current limitation of the underlying dependency Paratest. Just added a note on docs about that: https://github.com/laravel/docs/pull/6836.

authors: ProteanCode nunomaduro


text:
ShouldBeUnique doesn't work with scheduled task "job()"

Hi there,
I found the ShouldBeUnique interface on a job not working if the job gets started by the task scheduler. My intention is to let a job run fairly often but avoid "overtaking", thus not even dispatching the following run if the previous is still running.
To reproduce, create a basic job:
class TestJob implements ShouldQueue, ShouldBeUnique
{
... // sometimes long running job
}

... and schedule it in app/Console/Kernel.php:
class Kernel extends ConsoleKernel
{
    protected function schedule(Schedule $schedule)
    {
        $schedule->job(new TestJob)->everyMinute();
    }
}

If the previous instance is still running, the task scheduler still dispatches the job; a congestion occurs.
If I instead schedule the job as follows, ShouldBeUnique works as intended and documented:
$schedule->call(function () { TestJob::dispatch(); }
		)->name('TestJob')->everyMinute();

If this behavior is intended, then I propose mentioning this in the documentation.
Thank you!

Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.

authors: driesvints thkarcher


text:
Symfony Command Events in TestCase-Class using CreateApplication-Treat will always be rerouted

Laravel Version
10.5.1
PHP Version
8.2.4
Database Driver & Version
MariaDB 10.6.11 on Docker
Description
In the setUp method of the Illuminate\Foundation\Testing\TestCase-Class, a new app instance is created using the CreatesApplication-Trait:
namespace Tests;

use Illuminate\Contracts\Console\Kernel;

trait CreatesApplication
{
    /**
     * Creates the application.
     *
     * @return \Illuminate\Foundation\Application
     */
    public function createApplication()
    {
        $app = require __DIR__.'/../bootstrap/app.php';

        $app->make(Kernel::class)->bootstrap();

        return $app;
    }
}

In #46508 the rerouteSymfonyCommandEvents() method was added to the constructor of the Illuminate\Contracts\Console\Kernel-Class. The runningUnitTests() method should prevent it from being called during unit tests:
if (! $this->app->runningUnitTests()) {
    $this->rerouteSymfonyCommandEvents();
}

But since the app instance is not yet bootstrapped when the Kernel-Class is instantiated in the CreatesApplication-Trait, the method call of runningUnitTests() will incorrectly return false.
This could be fixed by registering the call as a booted listener:
$this->app->booted(function () {
    if (! $this->app->runningUnitTests()) {
        $this->rerouteSymfonyCommandEvents();
    }
});

Steps To Reproduce

Create new test which extends tests\TestCase-Class
Call artisan command like $this->artisan('migrate:fresh') in TestCase
Check if command will be rerouted

Auto-loading the event on tests environment will create a memory leak, see previously closed issue.

@crynobone I dont want the events to be rerouted in the testing env either, but it still happens if the app is not bootstrapped yet. Then $this->app->runningUnitTests() will always return false even if it is running in the testing env, because env is not bound when the constructor of the Kernel-Class is called. What about my solution by adding $this->app->booted()?

authors: cannahan crynobone


text:
OS command injection in Cookie

Laravel Version
10.12.2
PHP Version
8.2.7
Database Driver & Version
8.0.33
Description
The Base64-decoded value of the our_app_session cookie appears to be vulnerable to OS command injection attacks. It is possible to use the pipe character (|) to inject arbitrary OS commands. The command output does not appear to be returned in the application's responses, however it is possible to inject time delay commands to verify the existence of the vulnerability.
The payload '|ping -c 21 127.0.0.1 # was submitted in the Base64-decoded value of the medicina_pharmacy_session cookie. The application timed out when responding to the request, indicating that the injected command caused a time delay.
Steps To Reproduce
GET /consultation/asthma HTTP/2
Host: our_app.ourdomain.uk
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Language: en-US;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.5615.50 Safari/537.36
Connection: close
Cache-Control: max-age=0
Cookie: XSRF-TOKEN=eyJpdiI6IlhPL0JTK2V5M2l6WGlrTGZ6WkZNZUE9PSIsInZhbHVlIjoicytjZGlQTjdHazRvbmZibFg5dlR5dlgrTnlzL2MwZHA3TWhLQ1FGT04yQ1BSMDhoSlJmVFcvTTBSdWFjS0doaVFFeGFFNTJwMEpDVEFJb2FGZmZIamsyM3o1ZDA0TWRzeitmWU1OU21VRmxxeU5VeTljL0pEL1FiS3FzTVQ0d3QiLCJtYWMiOiI2ZmIyYmEwMGZkNGNlNjAwOTdkZWUxMGVlMDZmNTgwYWU0N2VhZGE0MjdhMDc1ZjYyNGQ3YzlmZTk1MjdlZDQzIiwidGFnIjoiIn0%3D; our_app_session=eyJpdiI6IkQ4Ni9HZjFOUkFWSGpCVWRlaXo0RFE9PSIsInZhbHVlIjoidkNYUTZHc3RYVm9Pa0UxVk0wKzR4MHJjamRuNTRGazMvN1J6Y2ZjS3pNbm1RbXhoNmdnWURieTBFV0RMSDk5SVJJQXcySVRYVWg2NXlsbExLY21MZU1Yd0JzWjd6WjdwY3YzRmVnWmRqbVQyN0JEN3ZwWVFhcllyL2xaTFlpVWsiLCJtYWMiOiI4OWI1ZGE1NGYxNWU4OWNmMGI2ZjA5YTQyODhlNjNjY2Q4OTQ2MThlOGVjMTY5NTJkNGM3Njg3MzkwOTVkYzU1IiwidGFnIjoiIn0nfHBpbmcgLWMgMjEgMTI3LjAuMC4xICM%3d
Upgrade-Insecure-Requests: 1
Referer: https://ourdomain.co.uk/cat/asthma
Sec-CH-UA: ".Not/A)Brand";v="99", "Google Chrome";v="112", "Chromium";v="112"
Sec-CH-UA-Platform: Windows
Sec-CH-UA-Mobile: ?0
Content-Length: 0

Great. Security issues have a different procedure. Now you are explaining how to attack thousands of laravel applications to potential hackers....

Doesn't hang for me - and I see no way putting anything in the MAC could trigger an OS command.

Hi,
Thanks, It was reported by burp suite, so I was not sure if its issues or we doing some thing wrong.
I am speaking with burp suite team, will update shortly.

Feel free to open a new issue when you can confirm this.

@fosiul I'm pretty sure this is a false positive, I've run numerous Burp scans on Laravel and it hasn't flagged this before.
The description says the request timed out, which Burp used to indicate confirmation of the injection but that could easily be unrelated - if Burp was running a scan, the server/app might have simply been overloaded.

authors: driesvints fosiul henzeb taylorotwell valorin


text:
Reverted PR 50403 (#50482) is missing in Illuminate/view Package

Laravel Version
v10.48.2
PHP Version
8.2.16
Database Driver & Version
No response
Description
It looks like that the reverted PR 50403 (#50482) is missing in illuminate/view Package
https://github.com/illuminate/view/blob/v10.48.2/Compilers/ComponentTagCompiler.php#L261
Steps To Reproduce
if you require  composer require illuminate/view:v10.48.2 you get the non reverted version.

Heya. Investigating.

I tried tagging v10.48.3 and that seems to have done the trick. Can you try again?

@driesvints works fine now, thanks a lot! 🚀
have a nice weekend ....

authors: Mathias-Witt driesvints


text:
How do I use phpiredis with Laravel?

Hey,
found nothing in the Docs, but I want to use https://github.com/nrk/phpiredis to increase the Performance of phpredis.
I know that https://github.com/nrk/predis/blob/master/src/Connection/PhpiredisSocketConnection.php exists, but I don't know how and where Laravel initializes its Predis connection.
Thanks.

Ask on the forums.

Alright, here we go again - you closing issues quite fast.
No PR from me regarding the Docs then.

That's fine. This question belongs on the forums. Either I close it now, or I close it in 2 week's time after it has exactly 0 comments on it.

authors: GrahamCampbell dhardtke


text:
Laravel 4.2 App::finish doesn't run after response is returned.

I was trying to do some lengthy processing on the backend after a response is returned to the client using App::finish but apparently what happened is that it actually wait for the processing to finish and then the response only get sent to the client.
Tried to put a dd('test) inside the App::finish, and in fact I received the response followed by the "test" string.
The laravel 4.2 docs say "The finish event is called after the response from your application has been sent back to the client"
Hope someone can shed some light regarding this. Thanks

4.2 isn't supported anymore. The forums might be a good place to ask though. :)

Sorry about that. Will head over to the forum for this matter. Thanks

authors: GrahamCampbell yantolee


text:
Remove the $this->path call from the constructor

Fixed #10909 .
$this->path = $this->path != '/' ? rtrim($this->path, '/').'/' : $this->path;

is resetting the real path appending a / always.

The tests are green. CI fails for there is no full stop.
-     * This test is useful when integrating with illuminate/database
+     * This test is useful when integrating with illuminate/database.

Please remove that phpdoc alltogether.

@GrahamCampbell the reason I kept is people not changing the test with the call for
        Paginator::currentPageResolver(function ($pageName) {
+            return 2;
+        });
+        Paginator::currentPathResolver(function () {
+            return '/posts';
+        });

Please add a fullstop then. ;)

source: gharchive/pull-request

authors: GrahamCampbell harikt


text:
Build parameters using arguments on the method using ReflectionMethod

Identifier order of parameter using index on the array between Request and method parameters in the Controller, extra parameter added after parameters.
Fix bug issue: https://github.com/laravel/framework/issues/12630
Ping @GrahamCampbell @taylorotwell

Route::GET('timeline/{category}/{action?}/{user_id?}', array('as' => 'timeline.index', 'uses' => 'FrontController@timeline'));

class BackEndController extends Controller
{
    public function timeline($category, $action="show", User $record=null, Request $request)
    {
		...
    }
}

Tests fail. Also on original issue they should just put the team higher in their route definition.

@taylorotwell Parameters send to Controller in two option.
First option if user not set argument on method send according to the parameters on the Request.
Second option if user set argument on method. It is using ReflectionMethod to get arguments then add parameter which Object not exist in parameters in script to know exist or not just using instanceof it would be problem if user have route like the following on the below, script would not add Product Model because it already exist in parameters eventhought it was Product Model for first_product.

Route::GET('compare/{first_product}/{second_product?}', array('as' => 'timeline.compare', 'uses' => 'FrontController@compare'));
public function compare(Product $firstProduct, Product $secondProduct=null)

It also make error while using optional parameters then using type hinting on method arguments with order like this required|Object,optional|string,optional|Object. It would output required|Object,optional|Object, It should pass correct output like this required|Object,optional|string,optional|Object. It report as bug issue https://github.com/laravel/framework/issues/12630

authors: joko-wandiro taylorotwell


text:
[5.4] Updating Filesystem to be compatible with contract

Hello,
i'm adding recursive parameter to files function in Filesystem class to be compatible with the Filesystem
contract :
    /**
     * Get an array of all files in a directory.
     *
     * @param  string|null  $directory
     * @param  bool  $recursive
     * @return array
     */
    public function files($directory = null, $recursive = false);

thanks.

When was this contract updated?

Oh, but this class does not implement the contract?

The contract is for https://github.com/laravel/framework/blob/5.4/src/Illuminate/Filesystem/FilesystemAdapter.php.

👎 for this code changing, since boolean parameters are against laravel's original ease of use vision.

Sorry then , i thought it was for Filesystem class.

No problem. :)


text:
[5.6] Revert #22517

I am ashamed. This is the correct PR that I previously wanted to do, and a revert of my own PR.
Original: https://github.com/laravel/framework/pull/22517
My failure: https://github.com/laravel/framework/pull/22532
My original reasoning about the original PR still stands.

That change was based on phpstan (static code analysis) which didn't take into account that this is a shared framework where, even if we return our own response in this particular implementation, anyone could have returned their own Response (based of Symfony's Response class). There's no functional requirement presented for removing this capability.

Your failure is pardoned. 😆

authors: sisve taylorotwell


text:
#27996 @include adding extra space/line break to content

The pull-request contains the fix for #27996
The main idea is to remove extra line break related to the added path comment during view rendering.
This fix should not affect any line breaks which doesn't relate to added path comment.
I personally don't like the following things in the fix.

If we change a form which is used to represent a path in compiled view, we should not forget to fix a rendering as well (I couldn't write a test for it, it looked quite complicated)

Totally we pass through a view 2 times, the first time when including the compiled view, and the second time when checking if it ends with path comment, probably it could be optimized and done with a single pass.

I appreciate if you could advise me how to improve it.

I'm not sure this is worth fixing? Should one blade component really be dependent on there not being any space rendered after another Blade component?

@taylorotwell IMO yes - here's the simplest illustration why:
This blade code renders a partial with an inline element:
@each('widget', $widgets, 'widget')

Before 5.8:

Since 5.8:

There are times when whitespace in HTML matters.

Rather than wrangling around with the file contents themselves, maybe there is a simpler way to approach this? Could we encode the original file path in the cached file path, perhaps where the cached file path is a base64_encoded version of the original file path? Or some approach like that. For now, I have disabled this feature on 5.8.

Closing since #28117 was merged.

authors: bzixilu fitztrev taylorotwell


text:
Add the ability add a sub query select

This PR adds the ability to select a sub query directly from the addSelect() method. This is currently only possible to do via the selectSub($query, $column) method, which has a few issues:
1. selectSub() has a less than ideal argument order
Since sub queries are written as closures, it's much nicer to have the column alias ($as) first. This is particularly important when you have longer, more complex sub queries.
With this change, the subquery is the second parameter:  addSelect($as, $query)
2. selectSub() requires you to specify columns
When you add a sub query using selectSub() you must also now specify your columns (*), otherwise you'll only get the sub query column back, not all the columns on the table. This behaviour is somewhat confusing, and also adds extra work each time you use a sub select.
With this change, if you pass a subquery to addSelect() as the second argument, it will automatically add "table".* to the query if you haven't already explicitly specified any columns. This is inline with the existing withCount() behaviour:
https://github.com/laravel/framework/blob/98d842542eb761b3aca67f3886e0ae9e6cadc4a4/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php#L360-L362
3. selectSub() isn't consistent with the framework
As a general rule, the query builder already automatically treats closures and query builder instances as sub queries. For example, if you pass a closure to the second argument in a where() clause, it will be treated as a sub query:
User::where('id', function ($query) {
    $query->select(...);
});

However, currently, if you'd like to add a subquery select to your query, you have to use selectSub(). I believe making this possible via addSelect() is more natural, and more consistent with the framework in general.
Motivation
I think sub queries are an under-utilized feature in Laravel. I think we can improve both the API and also add more documentation around sub queries. For example, I have been using sub queries to create dynamic relationships. Consider the following example:
class User extends Model
{
    public function lastLogin()
    {
        return $this->belongsTo(Login::class);
    }

    public function scopeWithLastLogin($query)
    {
        $query->addSelect('last_login_id', Login::select('id')
            ->whereColumn('user_id', 'users.id')
            ->latest()
            ->limit(1)
        )->with('lastLogin');
    }
}

$users = User::withLastLogin()->get();
$user->lastLogin->created_at;

/*
[
  [
    "id" => 1
    "first_name" => "Clark"
    "last_name" => "Kent"
    "email" => "clark@krypton.io"
    "last_login_id" => 666666666666
  ]
]
*/

Future considerations
This PR adds this functionality in the simplest possible way. If the addSelect() method receives two arguments, and the first is a string, and the second is a valid subquery, then it treats it as a subquery.
However, the addSelect() method currently supports both arrays and multiple arguments as well. I could see this method being extended in the future to also allow that type of behaviour. For example:
$users = User::select(['last_name', 'last_login_at' => Login::select('created_at')
    ->whereColumn('user_id', 'users.id')
    ->latest()
    ->limit(1)
]);

However, to keep things simple, I think it's better to just start here.

I think it makes more sense to adjust selectSub() (or selectRaw()) and add if (...) { $this->select($this->from.'.*'); } there. Then withCount() wouldn't have to select the default columns itself.
If we adjust addSelect(), we now have two ways of selecting subqueries that behave slightly differently and expect the parameters in a different order.
I also think don't think it's a good idea to have one method with the parameter order $as, $query, while other methods like fromSub() and joinSub() use $query, $as.

I think it makes more sense to adjust selectSub() (or selectRaw()) and add if (...) { $this->select($this->from.'.*'); } there. Then withCount() wouldn't have to select the default columns itself.

Yeah not opposed, but wouldn't that be a breaking change? Anyone using selectSub() directly right now could experience change in behaviour (ie. getting all columns instead of just the sub query column).

If we adjust addSelect(), we now have two ways of selecting subqueries that behave slightly differently and expect the parameters in a different order.

I agree, having different subquery methods with different behaviour isn't idea. But neither is the current implementation of selectSub(). So, how do we make improvements to the API, without creating breaking changes? This felt like the most pragmatic approach.

I also don't think it's a good idea to have one method with the parameter order $as, $query, while other methods like fromSub() and joinSub() use $query, $as.

Good point. We could just update fromSub() and joinSub() to support both argument orders.

Yeah not opposed, but wouldn't that be a breaking change? Anyone using selectSub() directly right now would experience a change in behaviour (ie. getting all columns instead of just the sub query column).

It would be a breaking change, but it should only affect very few people and I think the new behavior makes much more sense.
Are there use cases where you would want to select only a subquery without any other columns?

It would be a breaking change, but it should only affect very few people and I think the new behavior makes much more sense.

Right, so maybe this is an appropriate change for 6.x?

Are there use cases where you would want to select only a subquery without any other columns?

Yes, I think it's possible. My thinking what that you could still use selectSub() to accomplish this. But obviously that won't work if we change things. I think we'd need to add support for subqueries to select() as well then.

@staudenmeir Hey! What if we tried to fix the more core issue here, which is that addSelect() actually does select()  behaviour if no columns were previous assigned.
I've started hacking on a PR for this and would love to get your thoughts:
https://github.com/laravel/framework/pull/29588
Obviously some breaking changes here, but I think they won't be that bad, and might be a worthwhile change for 6.0.
Thoughts?

Okay folks, I've reworked this PR and I think it's now a lot better.
First off, I have not changed subSelect() at all. At first I thought about adding the table.* logic here, but in the end it didn't actually make sense there. The reason is because when we make a select() query with a subquery, we don't want the table.* added. However, it's a very safe assumption that when we use addSelect(), do we want table.* added. I almost see subSelect() as a private method that's (now) used by select() and addSelect().
Second, I removed the two column option for addSelect(). In the end I agreed with @staudenmeir that it felt odd for one method to have $as first, with all the other subquery methods having this argument come second. Instead, I added keyed array syntax for this. This is similar to how with() works in Laravel. For example:
$users = User::select(['id', 'name', 'last_login_date' => function ($query) {
    $query->select('last_login_date')
        ->from('logins')
        ->whereColumn('user_id', 'users.id')
        ->latest()
        ->limit(1);
}])->get();

You can also use this syntax with addSelect(). However, with addSelect(), it will automatically add table.* should no other columns be specified yet.
$users = User::addSelect(['last_login_date' => function ($query) {
    $query->select('last_login_date')
        ->from('logins')
        ->whereColumn('user_id', 'users.id')
        ->latest()
        ->limit(1);
}])->get();

It's important to note here that there are zero breaking changes with this PR (at least from what I can tell).

woohoo! to array handling
Having both the two parameter and array syntax approach might be nice
$lastLoginAt = Login::select('created_at')->latest()->limit(1);

User::query()
    ->select($lastLoginAt, 'last_login_at')
    ->orderBy($lastLoginAt)
    ->get();

Also, like withCount, maybe an alias can be assumed.. in the absence of a 2nd parameter
$user = User::select($lastLoginAt);

$user->logins_created_at

$column = $query->from + '_' + implode('_', $query->columns);

@reinink I think that's a great approach!

@staudenmeir Awesome! Thanks for your input. 💪
@dillingham Yeah I considered that, but I think that could be added as a subsequent PR. To be honest, I actually prefer the array format, and feel like it's more inline with the "Laravel way". And the auto aliasing is neat, but feels unnecessary.

I see your point. If from($query, ‘as’) happens it might be worth revisiting for parallelism.

I see your point. If from($query, ‘as’) happens it might be worth revisiting for parallelism.

Agreed.

@driesvints Can you restart the Travis build? I think that fail was a fluke. 🙏

@reinink done. I really need to have a look at that at some point 🤔

Is the ability to select a subquery using select() with keyed array syntax described somewhere in the documentation, because I cannot find something relevant.
If not, maybe we could update it :thinking:

authors: dillingham driesvints iraklisg reinink staudenmeir


text:
[7.x] Added range option to queue:retry command

Sometimes we need to send to queue retry several jobs and artisan queue:retry onyl allow a list of plain ids.
With this PR this command could accept a range of ids to retry on queue on new option --range=*.
This new option only allow integers as value:
$ php artisan queue:retry all
array:4 [
  0 => 50
  1 => 49
  2 => 48
  3 => 47
]

$ php artisan queue:retry 1
array:1 [
  0 => "1"
]

$ php artisan queue:retry 1 2
array:2 [
  0 => "1"
  1 => "2"
]

$ php artisan queue:retry a-a
array:1 [
  0 => "a-a"
]

$ php artisan queue:retry --range 10-20
array:11 [
  0 => 10
  1 => 11
  2 => 12
  3 => 13
  4 => 14
  5 => 15
  6 => 16
  7 => 17
  8 => 18
  9 => 19
  10 => 20
]

$ php artisan queue:retry 1 2 --range 10-20
array:13 [
  0 => "1"
  1 => "2"
  2 => 10
  3 => 11
  4 => 12
  5 => 13
  6 => 14
  7 => 15
  8 => 16
  9 => 17
  10 => 18
  11 => 19
  12 => 20
]

$ php artisan queue:retry 1 2 --range 10-15 --range 20-25
array:14 [
  0 => "1"
  1 => "2"
  2 => 10
  3 => 11
  4 => 12
  5 => 13
  6 => 14
  7 => 15
  8 => 20
  9 => 21
  10 => 22
  11 => 23
  12 => 24
  13 => 25
]

$ php artisan queue:retry 1 2 3 4 --range=10-10
array:5 [
  0 => "1"
  1 => "2"
  2 => "3"
  3 => "4"
  4 => 10
]

$ php artisan queue:retry 1 2 --range 15-10
array:8 [
  0 => "1"
  1 => "2"
  2 => 15
  3 => 14
  4 => 13
  5 => 12
  6 => 11
  7 => 10
]

This PR is compatible with current command options and don't break with custom IDs.

Many thanks, I was waiting for this one. :)

It would be nice if we could do this in running job too.

I'm confused. This is a really nice (undocumented) feature but, the logic finds records by the uuid column not the id.
https://github.com/laravel/framework/blob/61eac9cae4717699ecb3941b16c3d775820d4ca2/src/Illuminate/Queue/Console/RetryCommand.php#L58
I could go ahead and add some tests to confirm what I'm saying if we think this might be the case.
@taylorotwell @eusonlito


text:
[10.x] Fixing Double Job Delete to Optimize AWS SQS Calls

This pull request addresses a critical issue in the current implementation, where a double job delete occurs, leading to unnecessary and duplicated AWS calls to SQS (Simple Queue Service). The fix significantly improves the efficiency and resource utilization of the job deletion process, resulting in a more streamlined and cost-effective operation.
Benefits to End Users:
Enhanced Performance: Users will experience improved system performance due to the reduction in redundant AWS calls, leading to faster job processing and a more responsive application.
Cost Savings: By eliminating the extra SQS calls, this fix contributes to cost savings for users who rely on AWS resources for their application's job queue management.
Reliability: The removal of duplicated job deletions ensures the reliability and consistency of the job processing system, reducing the chances of errors and data inconsistencies.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

authors: Sfonxs taylorotwell


text:
WDCC not exported anymore

When exporting a repository with webdynpro component configurations, they are not listed in the repository. It seems as if the existence-check doesn't work properly - check generated where-clause

where-clause CONFIG_ID = 'ZMSG_RM_CREA_ZMSG_ROOM_ROOT 00' is wrong: it should be two different attributes addressed

If the key of the object's primary table is composed of multiple fields, /& addresses all of them - although the object key has all of them concatenated.

repo: larshp/abapGit-Plugins

license: mit

license_source: bigquery


text:
Update scalamock to 5.0.0

Updates org.scalamock:scalamock from 4.4.0 to 5.0.0.
GitHub Release Notes
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalamock", artifactId = "scalamock" } ]

labels: test-library-update, semver-major

Codecov Report

Merging #42 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #42   +/-   ##
=======================================
  Coverage   57.83%   57.83%
=======================================
  Files          20       20
  Lines         287      287
  Branches        4        4
=======================================
  Hits          166      166
  Misses        121      121

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efa32a5...2718277. Read the comment docs.

authors: codecov-commenter scala-steward

repo: laserdisc-io/mysql-binlog-stream


text:
[editor] Ctrl+Z does not return the prompts - input however returns the outputs - data

Proposed Solution:
When the user presses Ctrl+Z, the editor should undo the last action, including both the input and output, to restore the previous state compared to solely the output as it is right now. This behavior would be consistent with the interface, where Ctrl+Z typically undoes the last text entry or command. By restoring the input as well, users can easily revert to a previous state for their prompt input.
Expected Behavior:

User inputs a command or text in the editor.
User presses Ctrl+Z.
The editor undoes the last action, including both the input and output.
The editor returns to the state before the last action, showing the previous input prompt and removing the output data.
The user can continue working from the restored state, with the option to redo the undone action if needed.

Current Behavior:

User inputs a command or text in the editor.
The user presses Ctrl+Z when clicking on the input box.
The editor undoes the last action, which is solely the previous output.

Suggested Labels:

type: bug pri: critical status: planned sdk effort: mid

@vanshb03 thanks a lot for reporting, and for your suggestion. @rholinshead what do you think about this? We are currently doing undo/redo just based on the state that is propagated to the TextDocument

So to recreate the issue, you have to click in the box before you Ctrl+Z, that is when the output box is the only one that changes and the input box remains the same as shown on the issue.
@rholinshead @saqadri

Yes, I was proposing that Ctrl+Z would only undo the input and NOT the output.
Suggested Labels:
status: planned sdk

repo: lastmile-ai/aiconfig


text:
MUD dev-contracts watcher failed to deploy config or contracts changes

[MUDError]: Gas estimation error for registerSystem('0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0','73,110,99,114,101,109,101,110,116,83,121,115,116,101,109,0','0x51E8A72176b53f50388418471d771C2805f65e4B','true'): execution reverted
use pnpm mud dev-contracts --tsgenOutput ../client/src/mud -rpc xx

can you share your repo to be able to reproduce this issue? to which RRC are you deploying? For development it's recommended to use a local one

I plan to use chainlink, so I can only test on the test network. The version is the latest version. The RPC node is  https://polygon-mumbai.g.alchemy.com/v2/APIKEY. How can I use the online version in the front end? I tried it and there were many errors. Can you give an example version?

can you share your repo to be able to reproduce this issue? to which RRC are you deploying? For development it's recommended to use a local one

https://github.com/aLIEzsss4/LinkSpark/blob/master/packages/contracts/src/systems/HeroSystem.sol

for deploying to a testnet try the mud deploy command instead of mud dev-contracts. The former waits for transactions to be confirmed before sending the next one while the latter one just hammers the transactions out because the local node is fast enough to handle it. (Also the latter one redeploys every time you change a file, which is probably not what you want when deploying to a remote network)

for deploying to a testnet try the mud deploy command instead of mud dev-contracts. The former waits for transactions to be confirmed before sending the next one while the latter one just hammers the transactions out because the local node is fast enough to handle it. (Also the latter one redeploys every time you change a file, which is probably not what you want when deploying to a remote network)

How to use the Mumbai version in the frontend? I have tried it and there are many errors. Can you give an example version?

If the deployment succeeded you should be able to specify a chainId param to the client url. Could you share a screenshot of the errors you're seeing?

we just rebuild our deploy pipeline in https://github.com/latticexyz/mud/pull/1702, so going to close this as "outdated" for now but feel free to open with reproduction steps if this is still an issue

authors: aLIEzsss4 alvrs holic

repo: latticexyz/mud


text:
Redo the mud.config.ts page

Ludens: so as we need to do a bunch of doc work on namespaces here https://mud.dev/config; it would be good to bundle that with a lot of different examples of MUD configs and breaking them down cc @Ori Pomerantz
i was trying to explain a MUD config to someone and that page in the doc is one of the most lacking
Frolic: agreed! I think this page could become more of a guide on how to get started with the config (single vs multiple namespaces, how to use each top-level key, etc.)
then a sub page that ideally is generated from the TS doc that explains each config option so we don't have to keep em in sync
the config on this page is wrong anyway! overdue for an update

gonna consider this done for now

authors: holic qbzzt


text:
query_as! type conversion could require TryFrom instead of From

Hi,
I'm using Ulid as external identifier.
I can't use query_as! to fetch DAO with an Ulid attribute because it requires a From<String> impl which force to unwrap the value parsed by Ulid. See the example below:
// new types
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub struct SqlxUlid(Ulid);

// example DAO
pub struct Namespace {
    pub ulid: SqlxUlid,
    pub label: String,
}

/////////////// required impl by query_as! /////////////////

// Sadly query_as! requires a From and not a TryFrom
// which force to use unwrap
impl From<String> for SqlxUlid {
    fn from(value: String) -> Self {
        SqlxUlid(Ulid::from_string(&value).unwrap())
    }
}

impl sqlx::Type<Postgres> for SqlxUlid {
    fn type_info() -> <Postgres as sqlx::Database>::TypeInfo {
        PgTypeInfo::with_name("Varchar")
    }
}

impl<'q> sqlx::Encode<'q, Postgres> for SqlxUlid {
    fn encode_by_ref(
        &self,
        buf: &mut <Postgres as sqlx::database::HasArguments<'q>>::ArgumentBuffer,
    ) -> sqlx::encode::IsNull {
        <std::string::String as sqlx::Encode<'_, Postgres>>::encode(self.0.to_string(), buf)
    }
}

async fn query_as(pool: &PgPool) {
    let ulid = SqlxUlid(Ulid::new());

    sqlx::query_as!(
        Namespace,
        "SELECT ulid, label FROM namespaces WHERE ulid = $1",
        ulid.0.to_string()
    )
    .fetch_one(pool)
    .await;
}

Surprisingly you can achieve the desired behavior with query! because Decode trait manage Error. See the example below:
/////////////// required by query! /////////////////
impl<'r> sqlx::Decode<'r, Postgres> for SqlxUlid
where
    &'r str: sqlx::Decode<'r, Postgres>,
{
    fn decode(
        value: <Postgres as HasValueRef<'r>>::ValueRef,
    ) -> Result<SqlxUlid, Box<dyn Error + 'static + Send + Sync>> {
        let value: &str = <&str as sqlx::Decode<Postgres>>::decode(value)?;

        Ok(SqlxUlid(Ulid::from_string(value)?))
    }
}

async fn query(pool: &PgPool) {
    let ulid = SqlxUlid(Ulid::new());

    let record = sqlx::query!(
        r#"SELECT ulid as "ulid: SqlxUlid", label FROM namespaces WHERE ulid = $1"#,
        ulid.0.to_string()
    )
    .fetch_one(pool)
    .await
    .unwrap();

    let namespace = Namespace {
        ulid: record.ulid,
        label: record.label,
    };
}

Would it be possible to change the query_as From trait requirement by TryFrom?

I also have a problem like this. In my case I have a username type struct Username(String) and I don't want to implement From<String> on it because it would allow me to break the invariants that are guaranteed by my Username::new function.

Duplicate of #2648

See also: https://github.com/launchbadge/sqlx/pull/2649#issuecomment-1744094767

authors: Tipnos abonander benwh1

repo: launchbadge/sqlx


text:
Use matplotlib-cpp with Windows Visual Code ?

Hello everybody.
I use Windows Visual Code and I would like to draw curves on c ++ with matplotlib. The problem is that matplotlib-cpp only works with Visual Studio 2017.
Is it possible to draw curves from c ++ using matplotlib in Visual Code?
Thank you for your help.

Yes, I've had no problem using VSCode with this library. I dont think it's dependent on the editor, but on the compiler and flags. I usee g++ to link python.

You need to add to work on windows with Visual C++ compiler

#include
Add WITHOUT_NUMPY option or Remove lines 314 to 320 at the latest commit 7d0e695409e7029fd52a4653907a167b4cc725b9

With above workaround, matplotlib-cpp can work with any of 2015, 2017 and 2019.

matplotlib-cpp 1.0.22 - AppVeyor

I haven't tried, but vcpkg can be another option.

Hello, I have VSCode installed in my PC, but I am not able to install matplotlib correctly. I am getting error "cannot open source file "numpy/arrayobject.h" (dependency of "matplotlib.h")". If possible, can someone give a detailed tutorial to install the library. Thank you in advance.

Yes, I've had no problem using VSCode with this library. I dont think it's dependent on the editor, but on the compiler and flags. I use g++ to link python.

Hi,
How do you run the code using g++ in vs code terminal?

repo: lava/matplotlib-cpp


text:
UNMET PEER DEPENDENCY

When i try to install tslint globally by:
npm install -g tslint
I get this error:
UNMET PEER DEPENDENCY typescript@>=1.7.3
I assume it says i have to have typescript version bigger than 1.7.3
I have typescript installed globally version 1.8.2
When i list installed packages it shows installed.
On Windows.

I am moving this to correct repo.

repo: lavrton/SublimeLinter-contrib-tslint


text:
Verify Meshery compatibility with AKS

Describe the solution you'd like
Meshery compatibility with AKS has not been verified. Compatibility with this managed Kubernetes platform should be confirmed. Any changes needed should be flagged in an issue for implementation. Platform Compatibility in the Meshery documentation should be updated to reflect compatibility.
General Deployment Flow
Install Meshery locally. Point to AKS cluster. Update documentation based on experience.
Steps:

Install Meshery locally. Use mesheryctl (or meshery) either of which runs all the services on Docker using docker-compose.
Open Meshery UI (http://localhost:9081).
Configure Meshery to use kubeconfig specific to the AKS deployment. [using the kubeconfig file mostly found in your $HOME/.kube/config (OR) by getting the config from kubectl config view --raw > config command]
Deploy each supported service mesh & a sample app in that environment using Meshery.
Performance test each supported service mesh in the environment using Meshery.
Create issues and update documentation with changes needed.

@scotty-c on point here.

@leecalcote I will look at this later next week after Cloud Native Days NZ

@leecalcote just started working on this today. Will update shortly

@chandresh-pancholi We're in need of getting this up promptly. Do you think you can have a draft PR'ed tomorrow? If not that's ok, we just need to plan accordingly.

@scotty-c we are getting closer here...

@chandresh-pancholi We're in need of getting this up promptly. Do you think you can have a draft PR'ed tomorrow? If not that's ok, we just need to plan accordingly.

Is this something that you might be able to look at?

authors: leecalcote scotty-c


text:
JSON::ParserError unexpected token with playlist

An error when trying to get information for a playlist:
dl = YoutubeDL::Video.new "https://www.youtube.com/watch?v=aqz-KE-bpKQ&list=PLiYYIXHYUrMI6mMJADvK2FeoSgK3HuZ49"
dl.information
# JSON::ParserError: 784: unexpected token at '{"upload_date": "20150810" ...

I'm using the latest version of the gem, here are the contents of my Gemfile:
source 'https://rubygems.org'

# Rails Stuff
gem 'rails', '4.2.6'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'

gem 'sidekiq'
gem 'sidekiq-status'
gem 'youtube-dl.rb'
gem 'awesome_print'

group :development do
  gem 'web-console', '~> 2.0'
  gem 'spring'
  gem 'pry-rails'
end

Ruby version ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

Thanks for reporting this, Ben. I'm looking into it and I'll keep you updated.

So trying to dig further into this I've found that youtube-dl returns multiple json strings for each video in a playlist, separated by a new line, this of course breaks the JSON parsing.

Maybe this will help, this is a bit of code I used to pull out the individual media URLs from the JSON response from youtube-dl.
def extract_playlist(json)
  videos = json.split("\n").collect { |json|
    JSON.parse(json)
  }.collect { |source|
    source["webpage_url"]
  }
end

This wouldn't be an easy fix I don't think, it'd require adding support for playlists.

Thanks for the help, that really narrowed down the problem. Right now I'm thinking about either forcing #information to return an Array or figuring out if the URL is a playlist and then returning an Array. It also isn't really cool that the JSON from youtube-dl isn't valid JSON, so I'll probably make an issue upstream for that.
I've made a branch and a WIP PR to track development on this.

authors: benphelps sapslaj


text:
日期格式为时分时去掉秒的选择

议题条件

[X] 我确认已查看官方使用文档：https://layui.dev ，但没有找到相关解决方案。
[X] 我确认已在 Issues 中搜索过类似的问题，但没有找到相关解决方案。
[x] 我已仔细阅读： 🍀 Layui Issue 贡献指南

议题类型
功能请求
使用版本
v2.9.6
问题描述
能否在 format 值为 'HH:mm' 时 去掉秒数的选择，因为选择了也没效果，感觉显示出来不是很好。
业务代码
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Demo</title>
  <link href="//unpkg.com/layui@2.9.6/dist/css/layui.css" rel="stylesheet">

      请选择时间

        <input type="text" class="layui-input" id="ID-laydate-format-4" placeholder="HH:mm">

截图补充

浏览器
121.0.6167.185
演示地址
No response
友好承诺

[X] 我承诺将本着相互尊重、理解和友善的态度进行交流，共同维护 Layui 良好的社区氛围。

这是来自QQ邮箱的假期自动回复邮件。你好，我最近正在休假中，无法及时回复你的邮件。我将尽快给你回复。

repo: layui/layui


text:
优化 layer/table/colorpicker 组件

😃 本次 PR 的变化性质

请至少勾选一项（即 [ ] 内填写 x ）

[x] 功能新增
[ ] 问题修复
[x] 功能优化
[x] 分支合并
[ ] 其他改动：请在此处填写

🌱 本次 PR 的变化内容

优化 layer/laydate 依赖文件结构
新增 layer.photos 层的私有属性 hideFooter，用于控制是否隐藏图片底部栏
新增 layer.photos 层底部栏的「查看原图」功能
优化 table 代码细节
优化 colorpicker  组件选择块的尺寸（lg/md/sm/xs），以更好地应用于其他组件内（如 table）

✅ 本次 PR 的满足条件

请在申请合并之前，将符合条件的每一项进行勾选（即 [ ] 内填写 x ）

[x] 已提供在线演示地址（如：codepen）或无需演示
[x] 已对每一项的改动均测试通过
[x] 已提供具体的变化内容说明

表单的【开关】在表格中，如果表格是：sm，就别扭。。。

@hulang
因为表单没有 sm 尺寸，所以是不适用于 table sm 尺寸中的。

@sentsim 我也不想把table设置sm尺寸，有的列表实在字段太多。设置成sm尺寸，刚好。...

authors: hulang sentsim


text:
Update table.js: 给 leftDefaultTemp 增加 title

给内置工具栏的左边模板增加 title

Coverage decreased (-0.06%) to 26.231% when pulling b6d39022c2c0dda0c924c14bb667aa08e94587f4 on zhengmz:patch-2 into fba6ab7cd21a3532282f39f5b6d1c08b917097ce on sentsin:master.

该 PR 未及时处理表示歉意。
如今时间跨度大，相应代码处已进行较大大幅修改，提交的分支代码也已存在冲突。

authors: coveralls sentsim zhengmz


text:
shutdown on startup, with message "The daemon has unexpectedly shutdown. Goodbye."

The Issue
Steps to reproduce
1.Open LBRY app on mac os 10.12.5
2.LBRY app shuts down on its own, with error message "The daemon has unexpectedly shutdown. Goodbye."
3.
Expected behaviour
Tell us what should happen
I think the App should open, and allow me access to its goodness.
Actual behaviour
Tell us what happens instead
The app shuts down, and denies me all the goodness.
System Configuration

I cant access that.  App closes on startup.

LBRY Daemon version:v0.13
LBRY App version:v0.12.2
LBRY Installation ID:
Operating system:Mac OS 10.12.5

Anything Else

Screenshots

@TrompoMax thanks for reporting this! However, we cannot debug without more details.
Can you send your lbrynet.log file to help@lbry.io and reference this ticket (lbry-app #291)?

Where would I find lbrynet.log?

Oops, meant to include this link: https://lbry.io/faq/lbry-directories.

I do not have a LBRY folder in my applications support folder sub directory of Library.  This may be part of the problem.
I ran the software from Terminal, and this is the readout.  Does this help at all?
max-cranleys-macbook:~ workingaccount$ /Applications/LBRY.app/Contents/MacOS/LBRY ; exit;
Checking for lbrynet daemon
lbrynet daemon needs to be launched
Launching daemon: /Applications/LBRY.app/Contents/Resources/app/dist/lbrynet-daemon
2017-06-26 12:55:43,901 INFO     lbrynet.lbrynet_daemon.DaemonControl:92: Starting lbrynet-daemon from command line
2017-06-26 12:55:44,220 INFO     lbrynet.lbrynet_daemon.DaemonServer:64: Using non-authenticated API
2017-06-26 12:55:44,222 INFO     lbrynet.lbrynet_daemon.Daemon:254: Starting lbrynet-daemon
2017-06-26 12:55:44,309 INFO     lbrynet.lbrynet_daemon.ExchangeRateManager:174: Starting exchange rate manager
2017-06-26 12:55:44,480 INFO     lbrynet.lbrynet_daemon.Daemon:281: Platform: {"lbrynet_version": "0.13.1rc1", "platform": "Darwin-16.6.0-x86_64-i386-64bit", "os_system": "Darwin", "python_version": "2.7.13", "os_release": "16.6.0", "lbryum_version": "2.8.2", "ip": "2601:644:0:9285:1d0:6c38:e129:1d32", "lbryschema_version": "0.0.7", "processor": "i386", "build": "rc"}
2017-06-26 12:55:44,485 INFO     lbrynet.lbrynet_daemon.Daemon:488: Loading databases
2017-06-26 12:55:44,489 INFO     lbrynet.lbrynet_daemon.Daemon:516: Upgrading your databases
2017-06-26 12:55:44,489 INFO     lbrynet.db_migrator.migrate1to2:9: Doing the migration
2017-06-26 12:55:44,492 ERROR    lbrynet.lbrynet_daemon.DaemonControl:128: Failed to startup
Traceback (most recent call last):
File "site-packages/lbrynet/lbrynet_daemon/DaemonControl.py", line 125, in start_server_and_listen
File "site-packages/twisted/internet/defer.py", line 1297, in _inlineCallbacks
File "site-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
File "site-packages/lbrynet/lbrynet_daemon/DaemonServer.py", line 49, in start
File "site-packages/twisted/internet/defer.py", line 1297, in _inlineCallbacks
File "site-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
File "site-packages/lbrynet/lbrynet_daemon/Daemon.py", line 262, in setup
File "site-packages/twisted/python/threadpool.py", line 246, in inContext
File "site-packages/twisted/python/threadpool.py", line 262, in
File "site-packages/twisted/python/context.py", line 118, in callWithContext
File "site-packages/twisted/python/context.py", line 81, in callWithContext
File "site-packages/lbrynet/db_migrator/dbmigrator.py", line 9, in migrate_db
File "site-packages/lbrynet/db_migrator/migrate1to2.py", line 10, in do_migration
File "site-packages/lbrynet/db_migrator/migrate1to2.py", line 37, in migrate_blockchainname_db
OperationalError: no such table: claim_ids
2017-06-26 12:55:44,492 INFO     lbrynet.lbrynet_daemon.Daemon:412: Closing lbrynet session
2017-06-26 12:55:44,493 INFO     lbrynet.lbrynet_daemon.Daemon:413: Status at time of shutdown: loading_db
2017-06-26 12:55:44,494 INFO     lbrynet.lbrynet_daemon.Daemon:412: Closing lbrynet session
2017-06-26 12:55:44,495 INFO     lbrynet.lbrynet_daemon.Daemon:413: Status at time of shutdown: loading_db
The daemon has exited.
Did not request daemon stop, so quitting in 5 seconds.
Quitting.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]

Thanks, the issue is clear from that log so no need to email.

My pleasure.  Thank you!

@TrompoMax, another user had a similar issue on MAC and this was suggested:
Fix: to manually bypass this, delete blockchainname.db and db_revision in the lbrynet data folder.
Looks like you had an older installation, so this directory may be different. Can you search your pc for those files? Maybe then you will find the directory.
We will be working on a guide on how to do a fresh install while preserving most of your data (wallet especially!)

I did have an older version of the app installed, yes.  Please do let me know when that guide is complete.  I can't find those files, unfortunately.

@TrompoMax I can confirm that what @tzarebczan works as I was having the issue, too. Click "Go" in Finder at the top of the screen, use this location exactly: <~/Library/Application Support/LBRY>, and voila! You should be able to see those two files mentioned and delete them. All you do then is reopen LBRY.app and you should be good. :)

Yep, that did it.  Thanks guys!

Great! We will still work on a guide on how to clean install and then possibly copy over pertinent files.

@iretrala thanks for the tip, that was going to be part of the documentation (or how to show hidden files).  If you are on Slack, PM me and I'll throw you a couple LBC (my handle is jiggytom).

Ya, thanks again.  Just for clarity, there are at least 2 Library folders in MacOS.  One for each user, and one for the system.  All of my apps, including LBRY are in my main system applications directory, so I assumed the library folder you were asking me to look into was in that one.  The files I was looking for were actually in my user Library folder.

I'm going to close this, since this isn't an issue with the app itself (it's the daemon), the daemon devs know, and a help article is in the pipeline. Thanks all!

For anyone experiencing this issue on linux: the files where located in ~/.lbrynet and removing them fixed the issue.

I have tried everything without succes please Help !
Do I lost my wallet now?

Have you looked at https://lbry.io/faq/startup-troubleshooting ?
What os? Please provide logs.

Already tried everything No results ? IOS Mac pro

I replied to you on slack, give a reboot, Uninstall, reinstall a try. Then follow my other instructions about the log file.

I have Deleted all files from previous instalation do not find backup files ...

If I install on a Windows pc and sign in with my email and give the details from the transfer Bitrex to wallet with address Is it possible to get the coins back?

I have new install now on a Windows pc !
How to get my coins in the wallet ?

@SANOEK60 I'll work with you on Slack. Check your messages.

I have the same problem too! "The daemon has unexpectedly shutdown. Goodbye."
Windows 7
LBRY_0.16.1 or LBRY_0.15.0 the same

authors: SANOEK60 TrompoMax fap- iretrala kauffj lxcosmo tzarebczan

repo: lbryio/lbry-app


text:
Figure out why app image upgrade leaves 2 icons in tray

Looks like it shutdowns and the SDK restarts, but 2 icons are in the tray. The old one is not responsive to open/quit, but the new one is. If quit, both disappear. Might be an electron builder bug, will reach out to them also.

https://github.com/electron-userland/electron-builder/issues/4740

Maybe related #3898

This will be fixed in the next release.

repo: lbryio/lbry-desktop


text:
App crashes (update 0.16.13)

The Issue
The latest version crashes immediately when you start a video.  The audio keeps playing without video and Android shows a crash notification window. I deleted all app data first and then deleted the app an installed it again. This did not help. I downgraded to the version before and now it is working ok.
Steps to reproduce
1.open  a video
2.
3.
Expected behaviour
Tell us what should happen
No crash
Actual behaviour
Tell us what happens instead
Crash
System Configuration

Device: Samsung S7
Android version: 8.0
original- no root or anything like this.

Anything Else

Screenshots

Internal Use
Acceptance Criteria

Definition of Done

[ ]  Tested against acceptance criteria
[ ] Tested against the assumptions of the user story
[ ] The project builds without errors
[ ] Unit tests are written and passing
[ ] Tests on devices/browsers listed in the issue have passed
[ ] QA performed & issues resolved
[ ] Refactoring completed
[ ] Any configuration or build changes documented
[ ] Documentation updated
[ ] Peer Code Review performed

Issue transfer done.

Thanks, @akinwale .
Version 0.16.14 still shows the problem, @ksapp-dell . It will be fixed on next LBRY update. To fix it as quick as possible, I created a PR for 0.16.14a, which is the one with the fix applied. It has still to be merged.

Fixed on now released 0.16.15 version

authors: akinwale kekkyojin ksapp-dell

repo: lbryio/lbry-fdroid


text:
Research using MailJet email templates

Now that the email has been drastically simplified

I've not been happy with the results of my tests. Better emails will have to come from somewhere else.


text:
上层元素遮住下层元素的情况，应该怎么鼠标移入选中呢？

可以通过穿透路径获取:
https://leaferjs.com/ui/guide/property/pick.html

没有效果，好像加了穿透属性还是只获取到了上层元素，是不是我的参数传的有问题
        const leafer = new Leafer({ view: window })
        const ellipse = new Ellipse({ id: 'block', fill: 'black' })
        const rect = new Rect({ fill: '#32cd79' })
        leafer.add(ellipse)
        leafer.add(rect)
        console.log(
          leafer.pick({ x: 20, y: 20 }, {through: true})
        )

坐标传{x:50,y:50}再看看，另外结果需要你自己通过返回数据中的throughPath 查找，那是一个从下往上找到的元素顺序列表

可以，throughPath里面有，谢了。

authors: QmagicianEX leaferjs

repo: leaferjs/ui


text:
Add iOS v3.1.2.3 changelog

增加 iOS SDK v3.1.2.3 的 changelog。

@jwfing

repo: leancloud/leancloud-sdk


text:
Search in tables

Make it possible to search in the tables.

In products 12bdb16


text:
feat: Small.{u} sets are closed under various operations

This PR adds lemmas showing that sets constructed by applying basic set operations to small sets are themselves small. We now have corresponding Small ↥s versions of almost all of the Finite ↥s instances in the Finite.Set namespace.

!bench

bors merge

bors r-

bors r-

Please fix the mistakes and ping a reviewer/maintainer when you are done
bors d-

Are you still interested in this PR? If not, I can take it over.

I believe all that was missing with this PR was fixing some easy merge conflicts. This should be ready for review if CI passes. Sorry for the long delay on my end!

Okay great!
maintainer merge

authors: YaelDillies jcommelin mattrobball robertylewis timotree3 vihdzp


text:
chore: cache cancelled started builds

Per https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Some.20files.20not.20found.20in.20the.20cache/near/439945625

Thanks!  Up to modifying the comment, I am happy to
maintainer merge
this PR!

bors d+

bors merge

bors merge

authors: adomani jcommelin semorrison


text:
feat: @[simp] Nat.count / Nat.nth to id when p always true

You might want to have a look at #12907 and reconsider.
cc @Vierkantor

authors: YaelDillies llllvvuu


text:
feat(SetTheory/Game/PGame): inserting an option a game

inserting an option into a game

This PR is split out of #14498. Here, we define the operation of inserting a left or right option into a game, and prove a few standard results about it.

I moved insertLeft_numeric and insertRight_numeric to a position after Numeric.neg so I could use Numeric.neg to write the proof of insertRight_numeric in terms of insertLeft_numeric (like @eric-wieser did for the other file)

bors merge

authors: hwatheod semorrison


text:
chore(Algebra.Order.Ring.Rat): split into unbundled and bundled ordered algebra results

We split off all but the LinearOrderedCommRing and the inferred OrderedAddCommMonoid instances on Rat into Algebra.Order.Ring.Unbundled.Rat as these results do not require bundled ordered algebra classes.

[x] depends on: #15069

I think it's a good change, but I'm curious if there are performance benefits.
!bench

!bench

bors merge

authors: j-loreaux mattrobball


text:
feat: Binomial theorem for subtraction

ok! I fix all problem! What should I do next?

Thank you for your suggestion. I learn a lot. Then how can I merge this PR?

Neither of us can merge this PR. We need the approval of a maintainer. Luckily, I have mystical powers that let me invoke one solely by ushering the words
maintainer merge

hahahahahaha! That's so cool! I'm so lucky to meet you to review my PR and I learn so much from you! Thank you very much Combinatorics math genius!!!

bors merge

authors: ahhwuhu b-mehta


text:
chore: fix some file references

bors merge

authors: Ruben-VandeVelde kim-em


text:
feat: port NumberTheory.ADEInequality

Remaining open questions

[ ]  Is it ok to use uppercase for the letters "A" "D" and "E" in defs and theorems, like I propose?
[ ] Some proofs need a bit of golf, most notably and similar places. It works for now, but the more elegant version in lean3 didn't work, perhaps mainly because of the missing coe_coe
https://github.com/leanprover-community/mathlib4/blob/018c40bcbe97f0ab5e43be037415259e34ab3cd1/Mathlib/NumberTheory/ADEInequality.lean#L165-L168
[ ] One proof does not work that uses interval_cases extensively. This is because of this  commented out line:
https://github.com/leanprover-community/mathlib4/blob/c16c0c414d4ea87bd10716ffd38b93d9d66aa215/Mathlib/Tactic/IntervalCases.lean#L287
We probably want to fix that tactic?

I think it is OK to use uppercase because Combinator.S, K, I are in Mathlib.Init.Core.


text:
feat: port RingTheory.Noetherian

set_option synthInstance.etaExperiment true.  Please only use for testing.
Originally posted by @gebner in https://github.com/leanprover/lean4/issues/2074#issuecomment-1439279264
Is this no longer current guidance?

There's a dozen occurrences already in mathlib4, so I assume not

I ask with no preference. (Turning it on would save time to finish my taxes :) But some more formal guidance on using/documenting it might be helpful.

I made a Zulip topic since I don’t want to waste my time fixing things they don’t need it

authors: Ruben-VandeVelde mattrobball


text:
feat: add pretty-printer hints to matrix literals

bors r+

Let's see how this looks like on mathport.

authors: eric-wieser gebner


text:
doc: @[inherit_doc] on notations

Make all the notations that unambiguously should inherit the docstring of their definition actually inherit it.
Also write a few docstrings by hand. I only wrote the ones I was competent to write and which I was sure of. Some docstrings come from mathlib3 as they were lost during the early port.
This PR is only intended as a first pass There are many more docstrings to add.

Could you please fix merge conflict(s) and ping me on Zulip so that I review it before it rots again?

Otherwise LGTM. Thanks!
bors d+

bors merge

authors: YaelDillies urkud


text:
Update Template.lean to remove poisioned polyfill.io

Recently, polyfill.io, a well-known service for dynamically supplying polyfills for various browsers, has been the target of a supply chain attack. Numerous security researchers have confirmed the presence of malicious code within the JavaScripts provided by polyfill.io. This pull request proposes an alternative service URL from Cloudflare to replace the compromised domain.
References:

https://blog.qualys.com/vulnerabilities-threat-research/2024/06/28/polyfill-io-supply-chain-attack
https://blog.cloudflare.com/polyfill-io-now-available-on-cdnjs-reduce-your-supply-chain-risk

Thanks!

authors: hargoniX mnixry


text:
function that cleans up blob container

Files after being processed are moved to archive

[ ] create a function that cleans up certdata and certservice blob

Have ProcessCertDataFile and ProcessCertServiceFile functions archive then delete instead of seperate functions

https://github.com/learntocloud/azure-project-generator/pull/21

repo: learntocloud/azure-project-generator


text:
refactor: remove stacks and bitcoin tx models out of extension

Try out Leather build d254349 — Extension build, Test report, Storybook, Chromatic

This pr removes stacks and bitcoin tx models out of extension

Summary by CodeRabbit

Refactor

Updated import paths for Bitcoin and Stacks transaction models to a new module, improving code organization.
Refactored StacksTransactionItem component to use new props for better clarity and maintainability.
Simplified FtTransferItem and StxTransferItem components by directly passing props.

Chores

Reorganized imports across multiple files to align with the updated module structure.

@alter-eggo I think maybe the avatar broke here, but I can fix on my branch...

authors: alter-eggo fbwoolf

repo: leather-wallet/extension


text:
There is a bug when users are trying to edit grant totals.

https://github.com/ledgerleapllc/devxdao-backend/issues/42

Frontend commit https://github.com/ledgerleapllc/devxdao-frontend/commit/5b3cbff8d5d016fcee80d4c180062e0d3fca74a0

repo: ledgerleapllc/devxdao-frontend


text:
mobile not responsive page

Credit History Page not mobile responsive

Can you please confirm which device you are using?
It uses bootstrap stylings and classes. I've tested on an iPhone 14 Plus with no issues.

Samsung s21 Ultra

Apologies for the delay, can you confirm which client area theme you are using?

twenty one
some time appear like this

edit the class name was enough to fix the problem
from this
Remaining Credit
to this
Remaining Credit
I will close this issue

this is another photo for the problem


text:
Added support for attributes and texts of uint8_t, uint16_t and uint6…

I added support for attributes and text of uint8_t, uint16_t and uint64_t types. Also added QueryAttribute() for 'const char *' parameters to unify the interface.

I waffled on this one - sorry it took so long to respond. I feel like all the existing types should now switch over to the stdint types. This pull raises an interesting question: should type support be added for the uints? Any downsides?

Still need to switch to stdint types; closing this PR, but well aware of the issue.

authors: jsnkde leethomason

license: Zlib